Feedback from evaluation in a corporate environment

Brian de Alwis briandealwis at gmail.com
Fri Jan 8 22:46:48 GMT 2010


On 8-Jan-2010, at 10:19 AM, Barry Warsaw wrote:
> 'bzr init' is a useful command but it, and init-repo probably do not have the
> best names to encourage people to use the right command at the right time.
> 
> When I'm creating a new private project, or just starting a public project,
> 'bzr init' is what I usually want.  However if I'm joining an established
> project 'bzr init-repo' is usually what I want because I'm going to
> participate in something that has a big history.
> 
> So for my own use cases something like 'bzr begin' or 'bzr create' would be a
> better name than 'bzr init'.  And something like 'bzr join' or 'bzr
> participate' might be better than 'bzr init-repo'.  I'm less certain about the
> latter, but really "init-repo" is a terrible name for other reasons :).

I created a little plugin to add a new command called 'sprout' (as compared to branch) that provides this kind of functionality.  Given a branch location, sprout will create a repository (which I refer to as the "workspace") and then branch from the location into the repository.  Sprout also tries to be a bit DWIM-like in that when provided a non-branch, sprout will assume that the location is actually a repository and also try the location with a set of well-known "trunk" names.  The "trunk" names are currently "trunk" and "HEAD", but can be configured.

For example, sprouting from wdiff's repo:

	$ bzr sprout http://bzr.savannah.gnu.org/r/wdiff

is equivalent to:

	bzr init-repo wdiff
	bzr branch http://bzr.savannah.gnu.org/r/wdiff/trunk wdiff/trunk

Sprout uses the repository name to guess at the workspace name (when unspecified), so that the following:

	bzr sprout http://bzr.savannah.gnu.org/r/wdiff/branches/diff-input

produces wdiff/diff-input (instead of 'branches/diff-input').  And you can also provide the workspace name directly:

	bzr sprout http://bzr.savannah.gnu.org/r/wdiff/ my-wdiff-hacks

I presume sprout should work for the emacs repository too, but I don't have the patience to test :)  (I noticed some hangs when pulling from a pack-0.92 repository into a 2a repository.)

If anybody wants to fiddle, it's at lp:~slyguy/+junk/bzr-sprout.  It supports a few other options like --stacked, --bind, and --no-tree.  Unfortunately --stacked is fairly useless at present due to bug #375013.


And on the topic of workflow enhancement, I'd like a 'bzr clone' for doing a git-like pull-all-available branches; it would combine an init-repo with bzrtools' multi-pull.

Brian.

--
On bike helmets: "If you think your hair is more important than your brain, you're probably right."  (B. J. Wawrykow)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3901 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20100108/e52bac50/attachment.bin 


More information about the bazaar mailing list