lightweight branch for lightweight checkout?
John Arbash Meinel
john at arbash-meinel.com
Mon Apr 2 14:09:40 BST 2007
Olexandr Byelchenko wrote:
> I try to work with lightweight branches in last weeks.
> As I can see when I do branch of lightweight checkout I end with
> new standalone branch. This is understandable behavior, and probably
> this is intended behavior.
> But first time I naively expects that bzr will do "lightweight
> branch" operation, i.e. branch in my shared repo and create
> new lightweight checkout for me.
>
> Does there is exist some plugin to obtain such behavior?
>
> [µ]
'bzrtools' provides the 'cbranch' command. Which is used like:
cd $work
bzr cbranch ../a/branch new_target
bzr branch ../a/branch $REPO/new_target
bzr checkout [--lightweight] $REPO/new_target
You have to configure $REPO in ~/.bazaar/locations.conf as the key
"cbranch_root".
I work with heavy-weight checkouts, but IIRC Aaron does it all with
lightweight checkouts.
I work in a separate dir per bzr release, because otherwise I just have
too many branches, so my config looks something like:
[/home/jameinel/dev/bzr/0.15-dev]
cbranch_root=bzr+ssh://juju/srv/bzr/public/branches/bzr/0.15-dev
[/home/jameinel/dev/bzr/0.16-dev]
cbranch_root=bzr+ssh://juju/srv/bzr/public/branches/bzr/0.16-dev
...
I've tried doing:
[/home/jameinel/dev/bzr]
cbranch_root=bzr+ssh://juju/srv/bzr/public/branches/bzr
cbranch_root:policy = appendpath
But it turns out that causes 'bzr cbranch' to create:
$REPO/new_target/new_target
Because the 'config' option adds 'new_target', and 'cbranch' also adds
'new_target'.
John
=:->
PS> Oh, and remember that "bzr branch lwcheckout $TARGET" connects to
the *branch* of the checkout. So if TARGET is in your repository, this
is cheap.
More information about the bazaar
mailing list