Rev 3193: (andrew) Add some -Dhpss debugging to get_parent_map. in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Fri Jan 18 05:52:33 GMT 2008


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

------------------------------------------------------------
revno: 3193
revision-id:pqm at pqm.ubuntu.com-20080118055224-sskoia4bcpxd8wzu
parent: pqm at pqm.ubuntu.com-20080118011625-465mgy0mhdz1jiky
parent: andrew.bennetts at canonical.com-20080118040713-q4r1tckatjv74u8o
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Fri 2008-01-18 05:52:24 +0000
message:
  (andrew) Add some -Dhpss debugging to get_parent_map.
modified:
  bzrlib/remote.py               remote.py-20060720103555-yeeg2x51vn0rbtdp-1
    ------------------------------------------------------------
    revno: 3192.1.1
    revision-id:andrew.bennetts at canonical.com-20080118040713-q4r1tckatjv74u8o
    parent: pqm at pqm.ubuntu.com-20080118011625-465mgy0mhdz1jiky
    committer: Andrew Bennetts <andrew.bennetts at canonical.com>
    branch nick: get_parent_map-debug
    timestamp: Fri 2008-01-18 15:07:13 +1100
    message:
      Add some -Dhpss debugging to get_parent_map.
    modified:
      bzrlib/remote.py               remote.py-20060720103555-yeeg2x51vn0rbtdp-1
=== modified file 'bzrlib/remote.py'
--- a/bzrlib/remote.py	2008-01-17 07:47:52 +0000
+++ b/bzrlib/remote.py	2008-01-18 04:07:13 +0000
@@ -21,6 +21,7 @@
 
 from bzrlib import (
     branch,
+    debug,
     errors,
     graph,
     lockdir,
@@ -40,7 +41,7 @@
     zero_ninetyone,
     )
 from bzrlib.revision import NULL_REVISION
-from bzrlib.trace import note
+from bzrlib.trace import mutter, note
 
 # Note: RemoteBzrDirFormat is in bzrdir.py
 
@@ -767,7 +768,12 @@
         ancestry = self._parents_map
         missing_revisions = set(key for key in keys if key not in ancestry)
         if missing_revisions:
-            self._parents_map.update(self._get_parent_map(missing_revisions))
+            parent_map = self._get_parent_map(missing_revisions)
+            if 'hpss' in debug.debug_flags:
+                mutter('retransmitted revisions: %d of %d',
+                        len(set(self._parents_map).intersection(parent_map)),
+                        len(parent_map))
+            self._parents_map.update(parent_map)
         return dict((k, ancestry[k]) for k in keys if k in ancestry)
 
     def _response_is_unknown_method(self, response, verb):




More information about the bazaar-commits mailing list