Rev 3001: (John Arbash Meinel) Fix bug #162486, in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Fri Nov 16 03:22:50 GMT 2007


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 3001
revision-id: pqm at pqm.ubuntu.com-20071116032244-6vp47pvjovt9anps
parent: pqm at pqm.ubuntu.com-20071116023256-7s0y5xobbe3tzk13
parent: john at arbash-meinel.com-20071115203738-cp2smta76rhtlfor
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Fri 2007-11-16 03:22:44 +0000
message:
  (John Arbash Meinel) Fix bug #162486,
  	RemoteBranch should 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
    ------------------------------------------------------------
    revno: 2978.7.2
    merged: john at arbash-meinel.com-20071115203738-cp2smta76rhtlfor
    parent: john at arbash-meinel.com-20071113203709-kysdte0emqv84pnj
    parent: pqm at pqm.ubuntu.com-20071115144759-zx0nd44rgp38riwr
    committer: John Arbash Meinel <john at arbash-meinel.com>
    branch nick: remote_revid_to_revno_162486
    timestamp: Thu 2007-11-15 14:37:38 -0600
    message:
      [merge] bzr.dev 2998
    ------------------------------------------------------------
    revno: 2978.7.1
    merged: 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 file 'NEWS'
--- a/NEWS	2007-11-15 20:39:56 +0000
+++ b/NEWS	2007-11-16 03:22:44 +0000
@@ -73,6 +73,9 @@
 
    * Reconcile now shows progress bars. (Robert Collins, #159351)
 
+   * ``RemoteBranch`` was not initializing ``self._revision_id_to_revno_map``
+     properly. (John Arbash Meinel, #162486)
+
    * Stderr output via logging mechanism now goes through encoded wrapper
      and no more uses utf-8, but terminal encoding instead. So all unicode
      strings now should be readable in non-utf-8 terminal.

=== modified file 'bzrlib/remote.py'
--- a/bzrlib/remote.py	2007-11-14 08:20:26 +0000
+++ b/bzrlib/remote.py	2007-11-15 20:37:38 +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