[MERGE/RFC] Userdoc Driven Design on the Bazaar 2.0 UI

Stephen J. Turnbull stephen at xemacs.org
Thu Apr 16 09:51:35 BST 2009


Mark Shuttleworth writes:
 > Stephen J. Turnbull wrote:

 > > It seems to me that "bzr init-repo" is the kind of thing that users
 > > should not need to know about, period.

 > I think being able to create a repo somewhere that can then be used by
 > multiple branches is useful. However, it should NOT be the only way to
 > get shared repos.

I agree with both your points.  My point is that (with few exceptions
in practice) creation of and linking to a repo will be a side effect
of creation of a branch.  If you want it somewhere other than the
traditional .bzr/repository, use the --repo=/path/to/shared/repository
option.  If it already exists, validate it then link to it, where
"link" means "do whatever we do to indicate to a branch where its repo
is".

There could be a user profile item giving a default shared repo.  If
--repo is given without an argument, then prompt for a location, with
the default shared repo as default (this should always be confirmed, I
think).  Alternatively to creating a local repo automatically, "bzr
init" invoked interactively without --repo could always prompt for a
repo.  Eg:

    $ bzr init
    Initialized branch in /Users/steve/projects/foo.
    Choose a location for your repository of versions.  It is safe to
    accept the default.
    Repository location [./.bzr/repository]: 
    Created repository in /Users/steve/projects/foo/.bzr/repository.
    $ 

The user's profile could even contain a list of known shared
repositories, accessible via the familiar readline history mechanism.

And if you really want to create a repo without creating a branch,
this can be an obscure option to "bzr init".  For example, bzr init
--repo=/path/to/shared/repository --no-branch.  Eg, this could be used
for an OS install script, and the OS distro might provide a default
user profile that points to this system shared repo.

I'm not sure this would be compatible with current usage of bzr init,
though.



More information about the bazaar mailing list