Rev 4453: one more api tweak in http://bazaar.launchpad.net/~jameinel/bzr/1.17-annotate-bug387952

John Arbash Meinel john at arbash-meinel.com
Tue Jun 16 22:26:34 BST 2009


At http://bazaar.launchpad.net/~jameinel/bzr/1.17-annotate-bug387952

------------------------------------------------------------
revno: 4453
revision-id: john at arbash-meinel.com-20090616212629-vrst5j82phb7ynas
parent: john at arbash-meinel.com-20090616212448-be52l7nlaewoch7f
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 1.17-annotate-bug387952
timestamp: Tue 2009-06-16 16:26:29 -0500
message:
  one more api tweak
-------------- next part --------------
=== modified file 'bzrlib/annotate.py'
--- a/bzrlib/annotate.py	2009-06-16 21:24:48 +0000
+++ b/bzrlib/annotate.py	2009-06-16 21:26:29 +0000
@@ -400,7 +400,9 @@
 
 def _resolve_matching_region(output_lines, annotated_lines, new_idx,
                              right_parent_lines, parent_idx,
-                             match_len, new_revision_id, heads_provider):
+                             match_len, new_revision_id, heads_provider,
+                             break_tie):
+    """For this matching region, determine final annotations."""
     annotated_match_subset = annotated_lines[new_idx:new_idx + match_len]
     right_parent_subset = right_parent_lines[parent_idx:parent_idx + match_len]
     if annotated_match_subset == right_parent_subset:
@@ -431,8 +433,7 @@
                     # If the result is not stable, there is a risk a
                     # performance degradation as criss-cross merges will
                     # flip-flop the attribution.
-                    output_lines[out_idx] = _break_annotation_tie(
-                                        [new_line, right_line])
+                    output_lines[out_idx] = break_tie([new_line, right_line])
 
 
 def _reannotate_annotated(right_parent_lines, new_lines, new_revision_id,
@@ -469,7 +470,8 @@
         # Note that 'new_revision_id' is always superseded by annotated_lines
         _resolve_matching_region(lines, annotated_lines, new_idx,
                                  right_parent_lines, parent_idx,
-                                 match_len, new_revision_id, heads_provider)
+                                 match_len, new_revision_id, heads_provider,
+                                 break_tie=_break_annotation_tie)
 
         last_new_idx = new_idx + match_len
     return lines



More information about the bazaar-commits mailing list