Rev 4959: Cleanup. in file:///home/vila/src/bzr/bugs/476293-log-respect-direction/

Vincent Ladeuil v.ladeuil+lp at free.fr
Fri Jan 15 18:14:51 GMT 2010


At file:///home/vila/src/bzr/bugs/476293-log-respect-direction/

------------------------------------------------------------
revno: 4959
revision-id: v.ladeuil+lp at free.fr-20100115181451-vrlkt09fsyv25idg
parent: v.ladeuil+lp at free.fr-20100115132115-ijwx7we4sosw5lrj
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: cleanup
timestamp: Fri 2010-01-15 19:14:51 +0100
message:
  Cleanup.
  
  * bzrlib/tests/test_log.py:
  (TestGetViewRevisions.test_file_id_for_range): Fix too long lines.
  
  * bzrlib/log.py:
  (Logger): Fix typo in doc string.
  (_is_obvious_ancestor): Add comment.
  (_graph_view_revisions): Add comment.
  
  * bzrlib/builtins.py:
  (cmd_log): bzr-gtk provides viz but no glog.
-------------- next part --------------
=== modified file 'bzrlib/builtins.py'
--- a/bzrlib/builtins.py	2010-01-12 22:36:23 +0000
+++ b/bzrlib/builtins.py	2010-01-15 18:14:51 +0000
@@ -2191,7 +2191,7 @@
     :Tips & tricks:
 
       GUI tools and IDEs are often better at exploring history than command
-      line tools. You may prefer qlog or glog from the QBzr and Bzr-Gtk packages
+      line tools. You may prefer qlog or viz from the QBzr and Bzr-Gtk packages
       respectively for example. (TortoiseBzr uses qlog for displaying logs.) See
       http://bazaar-vcs.org/BzrPlugins and http://bazaar-vcs.org/IDEIntegration.
 

=== modified file 'bzrlib/log.py'
--- a/bzrlib/log.py	2010-01-05 02:13:02 +0000
+++ b/bzrlib/log.py	2010-01-15 18:14:51 +0000
@@ -304,7 +304,7 @@
 
 
 class Logger(object):
-    """An object the generates, formats and displays a log."""
+    """An object that generates, formats and displays a log."""
 
     def __init__(self, branch, rqst):
         """Create a Logger.
@@ -597,6 +597,8 @@
         else:
             # not obvious
             return False
+    # if either start or end is not specified then we use either the first or
+    # the last revision and *they* are obvious ancestors.
     return True
 
 
@@ -664,6 +666,10 @@
                 depth_adjustment = merge_depth
             if depth_adjustment:
                 if merge_depth < depth_adjustment:
+                    # From now on we reduce the depth adjustement, this can be
+                    # surprising for users. The alternative requires two passes
+                    # which breaks the fast display of the first revision
+                    # though.
                     depth_adjustment = merge_depth
                 merge_depth -= depth_adjustment
             yield rev_id, '.'.join(map(str, revno)), merge_depth

=== modified file 'bzrlib/tests/test_log.py'
--- a/bzrlib/tests/test_log.py	2010-01-14 15:25:17 +0000
+++ b/bzrlib/tests/test_log.py	2010-01-15 18:14:51 +0000
@@ -1164,10 +1164,12 @@
 
         rev_3a = rev_from_rev_id('3a', b)
         rev_4b = rev_from_rev_id('4b', b)
-        self.assertEqual([('3c', '3', 0), ('3b', '2.2.1', 1), ('3a', '2.1.1', 2)],
+        self.assertEqual([('3c', '3', 0), ('3b', '2.2.1', 1),
+                          ('3a', '2.1.1', 2)],
                           view_revs(rev_3a, rev_4b, 'f-id', 'reverse'))
         # Note: 3c still appears before 3a here because of depth-based sorting
-        self.assertEqual([('3c', '3', 0), ('3b', '2.2.1', 1), ('3a', '2.1.1', 2)],
+        self.assertEqual([('3c', '3', 0), ('3b', '2.2.1', 1),
+                          ('3a', '2.1.1', 2)],
                           view_revs(rev_3a, rev_4b, 'f-id', 'forward'))
 
 



More information about the bazaar-commits mailing list