'bzr init-repo' requires LOCATION; should default to '.'

Bug #247150 reported by Selene ToyKeeper
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Undecided
Unassigned

Bug Description

The 'bzr init-repo' command requires a location parameter, but part of its code appears to support a default value of '.'. Its run() function includes:

        if location is None:
            location = '.'

However, this is what happens when a user doesn't supply a location:

% mkdir foo ; cd foo
% bzr.dev init-repo
bzr: ERROR: command 'init-repository' requires argument LOCATION

This is in lp:bzr r3535.

Revision history for this message
Selene ToyKeeper (toykeeper) wrote :

Submitted a merge bundle to the mailing list.

Changed in bzr:
assignee: nobody → toykeeper
status: New → In Progress
Revision history for this message
Selene ToyKeeper (toykeeper) wrote :

This change is waiting on some other fixes. A few messages from the mailing list explain further:

* Robert Collins wrote:
> init-repo can affect existing branches:
>
> bzr init-repo foo
> mkdir foo/bar
> bzr branch SOMETHING foo/bar/baz
> bzr init-repo foo/bar
> bzr check foo/bar/baz

* Marius Kruger wrote:
> Ok, so it can still be disastrous, if you accidentally make a repository within a repository,
> where there is existing branches in the new repository's jurisdiction.
>
> Since this is possible at the moment and it can big problems especially if it goes
> undetected. I think we should at least give a warning if you create a
> repository within a repository, or even better detect if we are
> screwing up branches (but that could be very difficult/slow).

* Robert Collins wrote:
> I think that having an implicit '.' as the location should wait for the
> potential confusion to be detected by init-repo; yes there are potential
> performance implications in doing this.

Launchpad doesn't yet have a "later" bug status or bug dependencies, so I'll just leave this open for now.

Revision history for this message
John A Meinel (jameinel) wrote :

Marking this back as future work.

Changed in bzr:
assignee: Selene Scriven (toykeeper) → nobody
status: In Progress → Confirmed
tags: added: ui
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.