Interpret .bzr/branch/location relative to checkout root

Colin D Bennett colin at
Wed Oct 8 18:06:00 BST 2008

I have a problem where if a bzr lightweight checkout is accessed
through a different mount point in the filesystem, it can't find the
branch associated with it.  Now, the branch is under the same mount
point as my checkout:

    repo/          - shared repo
      trunk/       - treeless branch
      trunk/       - lightweight checkout

Now, on one machine this might be mounted at /home/cdb, but on another
it might be in a different location.

So the obvious solution is to edit '.bzr/branch/location' and make the
path relative, so I change it to '../../repo/trunk', so that it is
relative to the checkout location.  This solution works when the
current directory is 'trunk/', but if I do

  cd foo
  bzr st

I get the result:
 'ERROR: Not a branch: "[...]/mnt/work/repo/trunk/".'

So bzr is interpreting the '.bzr/branch/location' contents relative to
the current working directory.  I propose that it should interpret the
'location' of the checkout's bound branch relative to the checkout
root.  It should not behave differently depending on what subdirectory
depth you are at below the checkout.

Am I missing something?  Is the current behavior intended, and would a
patch be welcome to make it relative to the checkout root?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
Url : 

More information about the bazaar mailing list