Rev 5733: (jelmer) test_log: Added test cases for the --show-ids switch on 'long' and in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Wed Mar 23 09:56:54 UTC 2011
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 5733 [merge]
revision-id: pqm at pqm.ubuntu.com-20110323095651-uaa65kdnqqakpygm
parent: pqm at pqm.ubuntu.com-20110323055551-yy88m30tldulmg2t
parent: matt.giuca at gmail.com-20110321121810-10vhuj1422m7w146
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Wed 2011-03-23 09:56:51 +0000
message:
(jelmer) test_log: Added test cases for the --show-ids switch on 'long' and
'short' log formatters. (Matt Giuca)
modified:
bzrlib/tests/test_log.py testlog.py-20050728115707-1a514809d7d49309
=== modified file 'bzrlib/tests/test_log.py'
--- a/bzrlib/tests/test_log.py 2010-06-08 09:50:27 +0000
+++ b/bzrlib/tests/test_log.py 2011-03-21 12:18:10 +0000
@@ -371,6 +371,32 @@
wt.branch, log.ShortLogFormatter,
show_log_kwargs=dict(start_revision=rev, end_revision=rev))
+ def test_show_ids(self):
+ wt = self.make_branch_and_tree('parent')
+ self.build_tree(['parent/f1', 'parent/f2'])
+ wt.add(['f1','f2'])
+ self.wt_commit(wt, 'first post', rev_id='a')
+ child_wt = wt.bzrdir.sprout('child').open_workingtree()
+ self.wt_commit(child_wt, 'branch 1 changes', rev_id='b')
+ wt.merge_from_branch(child_wt.branch)
+ self.wt_commit(wt, 'merge branch 1', rev_id='c')
+ self.assertFormatterResult("""\
+ 2 Joe Foo\t2005-11-22 [merge]
+ revision-id:c
+ merge branch 1
+
+ 1.1.1 Joe Foo\t2005-11-22
+ revision-id:b
+ branch 1 changes
+
+ 1 Joe Foo\t2005-11-22
+ revision-id:a
+ first post
+
+""",
+ wt.branch, log.ShortLogFormatter,
+ formatter_kwargs=dict(levels=0,show_ids=True))
+
class TestShortLogFormatterWithMergeRevisions(TestCaseForLogFormatter):
@@ -659,6 +685,47 @@
self.assertEqualDiff('''custom_prop_name: test_value\n''',
sio.getvalue())
+ def test_show_ids(self):
+ wt = self.make_branch_and_tree('parent')
+ self.build_tree(['parent/f1', 'parent/f2'])
+ wt.add(['f1','f2'])
+ self.wt_commit(wt, 'first post', rev_id='a')
+ child_wt = wt.bzrdir.sprout('child').open_workingtree()
+ self.wt_commit(child_wt, 'branch 1 changes', rev_id='b')
+ wt.merge_from_branch(child_wt.branch)
+ self.wt_commit(wt, 'merge branch 1', rev_id='c')
+ self.assertFormatterResult("""\
+------------------------------------------------------------
+revno: 2 [merge]
+revision-id: c
+parent: a
+parent: b
+committer: Joe Foo <joe at foo.com>
+branch nick: parent
+timestamp: Tue 2005-11-22 00:00:02 +0000
+message:
+ merge branch 1
+ ------------------------------------------------------------
+ revno: 1.1.1
+ revision-id: b
+ parent: a
+ committer: Joe Foo <joe at foo.com>
+ branch nick: child
+ timestamp: Tue 2005-11-22 00:00:01 +0000
+ message:
+ branch 1 changes
+------------------------------------------------------------
+revno: 1
+revision-id: a
+committer: Joe Foo <joe at foo.com>
+branch nick: parent
+timestamp: Tue 2005-11-22 00:00:00 +0000
+message:
+ first post
+""",
+ wt.branch, log.LongLogFormatter,
+ formatter_kwargs=dict(levels=0,show_ids=True))
+
class TestLongLogFormatterWithoutMergeRevisions(TestCaseForLogFormatter):
More information about the bazaar-commits
mailing list