Rev 3716: a bit more debug info in http://bzr.arbash-meinel.com/branches/bzr/1.8-dev/lighter_log_file

John Arbash Meinel john at arbash-meinel.com
Thu Sep 18 19:26:22 BST 2008


At http://bzr.arbash-meinel.com/branches/bzr/1.8-dev/lighter_log_file

------------------------------------------------------------
revno: 3716
revision-id: john at arbash-meinel.com-20080918182621-g2w4klj590g2zptb
parent: john at arbash-meinel.com-20080918182100-n1gwuzs3ajy27kdc
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: lighter_log_file
timestamp: Thu 2008-09-18 13:26:21 -0500
message:
  a bit more debug info
-------------- next part --------------
=== modified file 'bzrlib/log.py'
--- a/bzrlib/log.py	2008-09-18 18:21:00 +0000
+++ b/bzrlib/log.py	2008-09-18 18:26:21 +0000
@@ -587,6 +587,7 @@
     # ancestry_values dictionary for the given revision. (So given a whole-tree
     # revision_id, what is the per-file ancestry for that revision.)
     ancestry_pointers = {}
+    _hits = [0, 0, 0, 0, 0, 0, 0]
     for rev in sorted_rev_list:
         parents = parent_map[rev]
         rev_pointer = None
@@ -613,6 +614,7 @@
                 if parent_pointer == rev_pointer:
                     # They both point to the same ancestry value, so we know
                     # there is nothing new
+                    _hits[5] += 1
                     continue
                 if rev_ancestry is None:
                     rev_ancestry = ancestry_values[rev_pointer]
@@ -625,6 +627,7 @@
                     # list, because we are only adding the 'new_revisions', so
                     # we know that we won't have duplicates.
                     if not isinstance(rev_ancestry, list):
+                        _hits[6] += 1
                         rev_ancestry = list(rev_ancestry)
                     rev_ancestry.extend(new_revisions)
                     # We will be creating a new value
@@ -640,7 +643,6 @@
 
     trev_ancestry = time.time()
 
-    _hits = [0, 0, 0, 0, 0]
     def is_merging_rev(r):
         _hits[0] = _hits[0] + 1
         parents = parent_map[r]



More information about the bazaar-commits mailing list