get_branch_reference fails in a new BzrDirMeta1Colo

Bug #891923 reported by Neil Martinsen-Burrell
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
New
Undecided
Unassigned

Bug Description

I would like to use get_branch_reference in a newly created colocated workspace to get the current branch name, but it fails with an error:

$ bzr init --development-colo file:test,branch=trunk
Created a lightweight checkout (format: development-colo)
$ cd test
$ PYTHONPATH=$HOME/src/bzr/bzr.dev python -c "from bzrlib import bzrdir; d=bzrdir.BzrDir.open('.'); d.get_branch_reference(name=None)"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/nmb/src/bzr/bzr.dev/bzrlib/bzrdir.py", line 855, in get_branch_reference
    format = BranchFormat.find_format(self, name=name)
  File "/Users/nmb/src/bzr/bzr.dev/bzrlib/branch.py", line 1615, in find_format
    raise errors.NotBranchError(path=transport.base, bzrdir=controldir)
bzrlib.errors.NotBranchError: Not a branch: "/Users/nmb/tmp/test/.bzr/branch/": location is a repository.

Tags: colocated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.