How to switch a checkout of a bound branch
A. S. Budden
abudden at gmail.com
Mon Mar 29 10:46:31 BST 2010
On 29 March 2010 02:19, Stefan Monnier <monnier at iro.umontreal.ca> wrote:
> If I do:
>
> bzr branch --bind --no-tree somewhere/foo
> bzr branch --bind --no-tree somewhere/bar
> bzr co --lightweight foo baz
> cd baz
> bzr switch bar
>
> Bzr tries to switch my `foo' branch to bind to somewhere/bar, rather
> than try to switch my `baz' checkout to point to my `bar' branch.
>
> This is rather unexpected and annoying.
> The only way around it I've found is to do:
>
> (cd ../foo; bzr unbind)
> bzr switch bar
> (cd ../foo; bzr bind)
>
> which is very inconvenient. Is that done on purpose?
My guess is that it is done on purpose. My workflow has:
/path/to/remote_server/ # Shared repository
/path/to/remote_server/trunk
/path/to/remote_server/branch1
# Get heavyweight checkout (aka bound branch) of trunk
bzr co /path/to/remote_server/trunk local_copy
cd local_copy
bzr switch branch1
The use of switch to point to the other branch on the server makes a
lot of sense in this workflow. What I'd really like to be able to do
is:
bzr switch trunk
bzr merge branch1
but instead I have to do:
bzr switch trunk
bzr merge /path/to/remote_server/branch1
I guess this was the workflow that someone had in mind when they made
the relative URLs for switch.
Al
More information about the bazaar
mailing list