Rev 6143: Add new paraneters add signature's ends, fix a test and a typo, check that no errors and no output is emitted when using assertLogRevnos. in file:///home/vila/src/bzr/reviews/log-omit-merges/

Vincent Ladeuil v.ladeuil+lp at free.fr
Fri Sep 9 17:20:53 UTC 2011


At file:///home/vila/src/bzr/reviews/log-omit-merges/

------------------------------------------------------------
revno: 6143
revision-id: v.ladeuil+lp at free.fr-20110909172052-hk61nux3nvt2vlv8
parent: martin.vgagern at gmx.net-20110909154502-vu1vz5llfhjodeld
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: log-omit-merges
timestamp: Fri 2011-09-09 19:20:52 +0200
message:
  Add new paraneters add signature's ends, fix a test and a typo, check that no errors and no output is emitted when using assertLogRevnos.
-------------- next part --------------
=== modified file 'bzrlib/builtins.py'
--- a/bzrlib/builtins.py	2011-09-09 15:21:21 +0000
+++ b/bzrlib/builtins.py	2011-09-09 17:20:52 +0000
@@ -2468,8 +2468,6 @@
             limit=None,
             show_diff=False,
             include_merges=False,
-            include_sidelines=None,
-            omit_merges=False,
             authors=None,
             exclude_common_ancestry=False,
             signatures=False,
@@ -2478,6 +2476,8 @@
             match_committer=None,
             match_author=None,
             match_bugs=None,
+            include_sidelines=None,
+            omit_merges=False,
             ):
         from bzrlib.log import (
             Logger,
@@ -4619,9 +4619,8 @@
             theirs_only=False,
             log_format=None, long=False, short=False, line=False,
             show_ids=False, verbose=False, this=False, other=False,
-            include_merges=False, include_sidelines=None,
-            revision=None, my_revision=None,
-            directory=u'.'):
+            include_merges=False, revision=None, my_revision=None,
+            directory=u'.', include_sidelines=None):
         from bzrlib.missing import find_unmerged, iter_log_revisions
         def message(s):
             if not is_quiet():

=== modified file 'bzrlib/log.py'
--- a/bzrlib/log.py	2011-09-09 15:21:21 +0000
+++ b/bzrlib/log.py	2011-09-09 17:20:52 +0000
@@ -288,7 +288,7 @@
       revisions. Keys can be 'message', 'author', 'committer', 'bugs' or
       the empty string to match any of the preceding properties.
 
-    :param omit_merges: If True, commits with mor than one parent are
+    :param omit_merges: If True, commits with more than one parent are
       omitted.
 
     """

=== modified file 'bzrlib/tests/blackbox/test_log.py'
--- a/bzrlib/tests/blackbox/test_log.py	2011-09-09 15:21:21 +0000
+++ b/bzrlib/tests/blackbox/test_log.py	2011-09-09 17:20:52 +0000
@@ -90,7 +90,9 @@
         return self.log_catcher.revisions
 
     def assertLogRevnos(self, args, expected_revnos, working_dir='.'):
-        self.run_bzr(['log'] + args, working_dir=working_dir)
+        err, out = self.run_bzr(['log'] + args, working_dir=working_dir)
+        self.assertEqual('', out)
+        self.assertEqual('', err)
         self.assertEqual(expected_revnos,
                          [r.revno for r in self.get_captured_revisions()])
 
@@ -551,18 +553,11 @@
 
     def test_include_sidelines(self):
         # Confirm --include-sidelines gives the same output as -n0
-        self.assertLogRevnos(['--include-sidelines'],
-                             ['2', '1.1.2', '1.2.1', '1.1.1', '1'],
-                             working_dir='level0')
-        self.assertLogRevnos(['--include-sidelines'],
-                             ['2', '1.1.2', '1.2.1', '1.1.1', '1'],
-                             working_dir='level0')
-        out_im, err_im = self.run_bzr('log --include-sidelines',
-                                      working_dir='level0')
-        out_n0, err_n0 = self.run_bzr('log -n0', working_dir='level0')
-        self.assertEqual('', err_im)
-        self.assertEqual('', err_n0)
-        self.assertEqual(out_im, out_n0)
+        expected = ['2', '1.1.2', '1.2.1', '1.1.1', '1']
+        self.assertLogRevnos(['--include-sidelines'],
+                             expected, working_dir='level0')
+        self.assertLogRevnos(['--include-sidelines'],
+                             expected, working_dir='level0')
 
     def test_force_merge_revisions_N(self):
         self.assertLogRevnos(['-n2'],



More information about the bazaar-commits mailing list