bzr cbranch usage
Neil Martinsen-Burrell
nmb at wartburg.edu
Tue Nov 24 22:35:45 GMT 2009
On 2009-11-24 16:23 , Xavier Maillard wrote:
> Hi,
>
> I am more and more interested in ligthweight checkout thus, I am
> trying to use them.
>
> I have read the documentation and I think I am missing something.
>
> Let's say I do something like this:
>
> cd ~/repos # this is where I am storing all my shared repositories
> bzr init-repo --no-trees foo/ ; cd foo
> bzr branch lp:foo trunk
> bzr branch trunk feature-bar # create branch for feature-bar
>
> At this stage, I have sucessfully set up my shared repository.
>
> Now, I want lightweight checkout somewhere else:
>
> cd ~/src # this is where all my working dirs live
> mkdir foo
> cd foo
> bzr co --lightweight ~/repos/foo/feature-bar
>
> This works quite well but the major drawback is I have to type
> too much and as a lazy guy, I do not like that.
>
> So let's try bzr cbranch (from bzrtools).
>
> My locations.conf is like that:
>
> [/home/xavier/src]
> cbranch_target = /home/xma/repos
> cbranch_target:policy = appendpath
>
> so I go to my working root tree:
>
> cd ~/src
>
> Now let's create a lightweight checkout bound to feature-baz:
> bzr cbranch --lightweight foo/trunk foo/feature-baz
>
> result:
>
> bzr: ERROR: Not a branch: "/home/xavier/src/foo/trunk".
>
> So, the question is quite basic: what the heck am I doing wrong ?
> Do I have to create the lightweight checkout manually -i.e bzr co
> ~repos/foo/trun foo/trunk in ~/src before being able to do
> cbranch ?
cbranch expects that you already have a lightweight checkout of the
project in ~/src. So, I think that your configuration is right, but you
need ``cd ~/src/foo; bzr co --lightweight /home/xma/repos/foo/trunk; cd
trunk; bzr cbranch --lightweight ../feature-baz`` should create
/home/xma/repos/foo/feature-baz and a lightweight checkout of that
branch in /home/xavier/src/foo/feature-baz. Is that what you want?
-Neil
More information about the bazaar
mailing list