Rev 3474: cleanup in http://bzr.arbash-meinel.com/branches/bzr/1.6-dev/annotation

John Arbash Meinel john at arbash-meinel.com
Wed Jun 4 23:59:21 BST 2008


At http://bzr.arbash-meinel.com/branches/bzr/1.6-dev/annotation

------------------------------------------------------------
revno: 3474
revision-id: john at arbash-meinel.com-20080604225908-cbnxepcjoqcsy65n
parent: john at arbash-meinel.com-20080604225545-f47gdy77gv92a95s
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: annotation
timestamp: Wed 2008-06-04 17:59:08 -0500
message:
  cleanup
modified:
  bzrlib/annotate.py             annotate.py-20050922133147-7c60541d2614f022
-------------- next part --------------
=== modified file 'bzrlib/annotate.py'
--- a/bzrlib/annotate.py	2008-06-04 22:55:45 +0000
+++ b/bzrlib/annotate.py	2008-06-04 22:59:08 +0000
@@ -96,36 +96,38 @@
         """
         if len(plain_child_lines) != len(annotated_lines):
             raise AssertionError("mismatched plain_child_lines and annotated_lines")
-        # First compare the newly annotated lines with the right annotated lines.
-        # Lines which were not changed in left or right should match. This tends to
-        # be the bulk of the lines, and they will need no further processing.
+        # First compare the newly annotated lines with the right annotated
+        # lines.  Lines which were not changed in left or right should match.
+        # This tends to be the bulk of the lines, and they will need no further
+        # processing.
         lines = []
         lines_extend = lines.extend
-        last_right_idx = 0 # The line just after the last match from the right side
+        last_right_idx = 0 # The line after the last match from the right side
         last_left_idx = 0
 
         matching_left_and_right = self._get_matching_blocks(right_parent_lines,
                                                             annotated_lines)
         for right_idx, left_idx, match_len in matching_left_and_right:
-            # annotated lines from last_left_idx to left_idx did not match the lines from
-            # last_right_idx
-            # to right_idx, the raw lines should be compared to determine what annotations
-            # need to be updated
+            # annotated lines from last_left_idx to left_idx did not match the
+            # lines from last_right_idx to right_idx, the raw lines should be
+            # compared to determine what annotations need to be updated
             if last_right_idx == right_idx or last_left_idx == left_idx:
                 # One of the sides is empty, so this is a pure insertion
                 lines_extend(annotated_lines[last_left_idx:left_idx])
             else:
                 # We need to see if any of the unannotated lines match
                 self.process_unmatched_lines(lines,
-                                               plain_child_lines, annotated_lines,
-                                               last_left_idx, left_idx,
-                                               right_parent_lines,
-                                               last_right_idx, right_idx,
-                                               heads_provider,
-                                               child_revision_id)
+                                             plain_child_lines,
+                                             annotated_lines,
+                                             last_left_idx, left_idx,
+                                             right_parent_lines,
+                                             last_right_idx, right_idx,
+                                             heads_provider,
+                                             child_revision_id)
             last_right_idx = right_idx + match_len
             last_left_idx = left_idx + match_len
-            # If left and right agree on a range, just push that into the output
+            # If left and right agree on a range, just push that into the
+            # output
             lines_extend(annotated_lines[left_idx:left_idx + match_len])
         return lines
 



More information about the bazaar-commits mailing list