bzr log -r <merged-revision> on a remote branch fails with AttributeError
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
Low
|
John A Meinel |
Bug Description
It seems that trying to access a revision that was part of a merged fails on a remote branch (bzr+ssh:).
For example, when I run:
$ bzr log -r 5088.2.4 bzr+ssh:
Traceback (most recent call last):
File "/usr/lib/
return run_bzr(argv)
File "/usr/lib/
ret = run(*run_argv)
File "/usr/lib/
return self.run(
File "/usr/lib/
result = func(*args, **kwargs)
File "/usr/lib/
rev1 = rev2 = revision[
File "/usr/lib/
return self._match_
File "/usr/lib/
info = self._match_
File "/usr/lib/
revision_
File "/usr/lib/
return unbound(self, *args, **kwargs)
File "/usr/lib/
if self._revision_
AttributeError: 'RemoteBranch' object has no attribute '_revision_
bzr 0.92.0.candidate.1 on python 2.5.1.final.0 (linux2)
arguments: ['/usr/bin/bzr', 'log', '-r', '5088.2.4', 'bzr+ssh:
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'fr_CA.UTF-8'
plugins:
bzrtools /usr/lib/
launchpad /usr/lib/
multiparent /usr/lib/
pqm /usr/lib/
** Please send this report to <email address hidden>
with a description of what you were doing when the
error occurred.
Related branches
Changed in bzr: | |
status: | Fix Committed → Fix Released |
The fix is pretty trivial:
self. _revision_ history_ cache = None id_to_revno_ cache = None
self. bzrdir = remote_bzrdir
self. _client = _client
=== modified file 'bzrlib/remote.py'
--- bzrlib/remote.py 2007-11-04 20:35:32 +0000
+++ bzrlib/remote.py 2007-11-13 20:09:45 +0000
@@ -934,6 +934,7 @@
# will try to assign to self.tags, which is a property in this subclass.
# And the parent's __init__ doesn't do much anyway.
+ self._revision_
if _client is not None:
The reason is that RemoteBranch isn't calling the base Branch.__init__() [there is a comment as to why], but it is using the base classes' implementation of get_revision_ id_to_revno_ map(), which checks for it.
The only other piece necessary is to add a branch_ implementations test that get_revision_ id_to_revno_ map() works correctly. I'll try and put that together.