Rev 4526: NEWS about fixing bug #387952, and about improvements in 'bzr annotate' in http://bazaar.launchpad.net/~jameinel/bzr/1.17-rework-annotate

John Arbash Meinel john at arbash-meinel.com
Tue Jul 7 03:53:35 BST 2009


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

------------------------------------------------------------
revno: 4526
revision-id: john at arbash-meinel.com-20090707025308-jegn3ug8mndij175
parent: john at arbash-meinel.com-20090706213140-dsyexxaynqaxea8d
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 1.17-rework-annotate
timestamp: Mon 2009-07-06 21:53:08 -0500
message:
  NEWS about fixing bug #387952, and about improvements in 'bzr annotate'
-------------- next part --------------
=== modified file 'NEWS'
--- a/NEWS	2009-07-02 04:49:28 +0000
+++ b/NEWS	2009-07-07 02:53:08 +0000
@@ -48,6 +48,9 @@
   diverged-branches`` when a push fails because the branches have
   diverged.  (Neil Martinsen-Burrell, #269477)
 
+* Annotate would sometimes 'latch on' to trivial lines, causing important
+  lines to be incorrectly annotated. (John Arbash Meinel, #387952)
+
 * Automatic format upgrades triggered by default stacking policies on a
   1.16rc1 (or later) smart server work again.
   (Andrew Bennetts, #388675)
@@ -145,7 +148,12 @@
 Improvements
 ************
 
-``bzr ls`` is now faster. On OpenOffice.org, the time drops from 2.4
+* ``bzr annotate`` can now be significantly faster. The time for
+  ``bzr annotate NEWS`` is down to 7s from 22s in 1.16. Files with long
+  histories and lots of 'duplicate insertions' will be improved more than
+  others. (John Arbash Meinel, Vincent Ladeuil)
+
+* ``bzr ls`` is now faster. On OpenOffice.org, the time drops from 2.4
   to 1.1 seconds. The improvement for ``bzr ls -r-1`` is more
   substantial dropping from 54.3 to 1.1 seconds. (Ian Clatworthy)
 

=== modified file 'bzrlib/annotate.py'
--- a/bzrlib/annotate.py	2009-06-24 20:44:46 +0000
+++ b/bzrlib/annotate.py	2009-07-07 02:53:08 +0000
@@ -313,7 +313,9 @@
     return matcher.get_matching_blocks()
 
 
-def _break_annotation_tie(annotated_lines):
+_break_annotation_tie = None
+
+def _old_break_annotation_tie(annotated_lines):
     """Chose an attribution between several possible ones.
 
     :param annotated_lines: A list of tuples ((file_id, rev_id), line) where
@@ -394,7 +396,11 @@
                         # If the result is not stable, there is a risk a
                         # performance degradation as criss-cross merges will
                         # flip-flop the attribution.
-                        output_append(_break_annotation_tie([left, right]))
+                        if _break_annotation_tie is None:
+                            res = _old_break_annotation_tie([left, right])
+                        else:
+                            res = _break_annotation_tie([left, right])
+                        output_append(res)
         last_child_idx = child_idx + match_len
 
 



More information about the bazaar-commits mailing list