Rev 2979: Fix bug #162486, by having RemoteBranch properly initialize self._revision_id_to_revno_map. in http://bzr.arbash-meinel.com/branches/bzr/0.93-dev/remote_revid_to_revno_162486
John Arbash Meinel
john at arbash-meinel.com
Tue Nov 13 20:46:08 GMT 2007
At http://bzr.arbash-meinel.com/branches/bzr/0.93-dev/remote_revid_to_revno_162486
------------------------------------------------------------
revno: 2979
revision-id:john at arbash-meinel.com-20071113203709-kysdte0emqv84pnj
parent: pqm at pqm.ubuntu.com-20071109195036-5o5bwu0a01uniqwg
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: remote_revid_to_revno_162486
timestamp: Tue 2007-11-13 14:37:09 -0600
message:
Fix bug #162486, by having RemoteBranch properly initialize self._revision_id_to_revno_map.
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/remote.py remote.py-20060720103555-yeeg2x51vn0rbtdp-1
bzrlib/tests/branch_implementations/test_get_revision_id_to_revno_map.py test_get_revision_id-20070417211641-6kcoj1c704gqqopn-1
-------------- next part --------------
=== modified file 'NEWS'
--- a/NEWS 2007-11-09 19:50:36 +0000
+++ b/NEWS 2007-11-13 20:37:09 +0000
@@ -63,6 +63,9 @@
* Reconcile now shows progress bars. (Robert Collins, #159351)
+ * ``RemoteBranch`` was not initializing ``self._revision_id_to_revno_map``
+ properly. (John Arbash Meinel, #162486)
+
* Unicode-safe output from ``bzr info``. The output will be encoded
using the terminal encoding and unrepresentable characters will be
replaced by '?'. (Luk???? Lalinsk??, #151844)
=== modified file 'bzrlib/remote.py'
--- a/bzrlib/remote.py 2007-11-04 20:35:32 +0000
+++ b/bzrlib/remote.py 2007-11-13 20:37:09 +0000
@@ -933,6 +933,7 @@
# We intentionally don't call the parent class's __init__, because it
# 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_id_to_revno_cache = None
self._revision_history_cache = None
self.bzrdir = remote_bzrdir
if _client is not None:
=== modified file 'bzrlib/tests/branch_implementations/test_get_revision_id_to_revno_map.py'
--- a/bzrlib/tests/branch_implementations/test_get_revision_id_to_revno_map.py 2007-04-24 19:43:09 +0000
+++ b/bzrlib/tests/branch_implementations/test_get_revision_id_to_revno_map.py 2007-11-13 20:37:09 +0000
@@ -28,11 +28,13 @@
def test_simple_revno(self):
tree = self.create_tree_with_merge()
- the_branch = tree.branch
+ # Re-open the branch so we make sure we start fresh.
+ # see bug #162486
+ the_branch = tree.bzrdir.open_branch()
self.assertEqual({'rev-1':(1,), 'rev-2':(2,), 'rev-3':(3,),
'rev-1.1.1':(1,1,1)
- }, tree.branch.get_revision_id_to_revno_map())
+ }, the_branch.get_revision_id_to_revno_map())
class TestCaching(TestCaseWithBranch):
More information about the bazaar-commits
mailing list