"bzr bind" on a RemoteBranch gives confusing "upgrade required" message

Bug #348208 reported by Mary Gardiner
0
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Low
Unassigned

Bug Description

Scenario:

I have a remote branch at bzr+ssh://remote/remote-branch

I have a local heavyweight checkout at /local/local-heavyweight-checkout

I have a local lightweight checkout of the remote branch at /local/local-lightweight-checkout

I would like to bind /local/local-lightweight-checkout to /local/local-heavyweight-checkout rather than the current value bzr+ssh://remote/remote-branch

cd /local/local-lightweight-checkout; bzr bind /local/local-heavyweight-checkout

returns an error:

bzr: ERROR: To use this feature you must upgrade your branch at bzr+ssh://remote/remote-branch

However,

bzr info bzr+ssh://remote/remote-branch

reports "bzr: ERROR: The branch format Meta directory format 1 is already at the most recent format."

The traceback in ~/.bzr.log from the "bzr bind" step is:

5.033 Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 716, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 911, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 547, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.6/dist-packages/bzrlib/builtins.py", line 4210, in run
    b.bind(b_other)
  File "/usr/lib/python2.6/dist-packages/bzrlib/branch.py", line 467, in bind
    raise errors.UpgradeRequired(self.base)
UpgradeRequired: To use this feature you must upgrade your branch at bzr+ssh://remote/remote-branch.

bzr versions:

local: $ bzr --version
Bazaar (bzr) 1.13
  Python interpreter: /usr/bin/python 2.6.1
  Python standard library: /usr/lib/python2.6
  bzrlib: /usr/lib/python2.6/dist-packages/bzrlib

remote: $ bzr --version
Bazaar (bzr) 1.12
  Python interpreter: /usr/bin/python 2.5.2
  Python standard library: /usr/lib/python2.5
  bzrlib: /usr/lib/python2.5/site-packages/bzrlib

The error from bzr bind persisted when I upgraded the remote side to 1.13.

description: updated
summary: - "bzr bind" insists on an upgrade, but the bound location is already at
- the newest format
+ "bzr bind" insists on an upgrade of previously bound location, but the
+ location is already at the newest format
Revision history for this message
Andrew Bennetts (spiv) wrote :

RemoteBranch doesn't implement bind, so that's the immediate cause of the UpgradeRequired exception. At a minimum we should make RemoteBranch raise a more appropriate error from bind.

I think perhaps cmd_bind on the lightweight checkout is opening the referenced branch, rather than the lightweight checkout itself, and that's why the referenced branch is being told to bind, rather than the lightweight checkout as Mary intended.

Does "cd /local/local-lightweight-checkout; bzr switch /local/local-heavyweight-checkout" work?

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 348208] Re: "bzr bind" insists on an upgrade, but the bound location is already at the newest format

well bind always operates on branches, so yes, 'bzr bind' on a
lightweight checkout will operate on the branch it points at. bzr bind
in a lightweight checkout does have uses, but its not common.

-Rob

Martin Pool (mbp)
summary: - "bzr bind" insists on an upgrade of previously bound location, but the
- location is already at the newest format
+ "bzr bind" on a RemoteBranch gives confusing "upgrade required" message
Changed in bzr:
status: New → Confirmed
importance: Undecided → Low
tags: added: bind checkout hpss
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
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.