Rev 3949: (jam) Include the tests for log --short in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Tue Jan 20 21:03:04 GMT 2009
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 3949
revision-id: pqm at pqm.ubuntu.com-20090120210300-641tutf1rkdn8a3n
parent: pqm at pqm.ubuntu.com-20090120044335-pwr2rshr1yu6vzti
parent: john at arbash-meinel.com-20090120201745-gkvsfuhc9tf7m1bm
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Tue 2009-01-20 21:03:00 +0000
message:
(jam) Include the tests for log --short
modified:
bzrlib/tests/test_log.py testlog.py-20050728115707-1a514809d7d49309
------------------------------------------------------------
revno: 3943.4.5
revision-id: john at arbash-meinel.com-20090120201745-gkvsfuhc9tf7m1bm
parent: john at arbash-meinel.com-20090116223613-sywet9fbx0589a3z
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 1.12-fix-short-log
timestamp: Tue 2009-01-20 14:17:45 -0600
message:
Restore _linear_view_revisions.
modified:
bzrlib/log.py log.py-20050505065812-c40ce11702fe5fb1
------------------------------------------------------------
revno: 3943.4.4
revision-id: john at arbash-meinel.com-20090116223613-sywet9fbx0589a3z
parent: john at arbash-meinel.com-20090116223224-hspiby4drt1ng7uy
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 1.12-fix-short-log
timestamp: Fri 2009-01-16 16:36:13 -0600
message:
Remove _linear_view_revisions.
It isn't actually faster than the other code anymore, and it means
we don't have to worry about maintaining multiple code paths.
modified:
bzrlib/log.py log.py-20050505065812-c40ce11702fe5fb1
------------------------------------------------------------
revno: 3943.4.3
revision-id: john at arbash-meinel.com-20090116223224-hspiby4drt1ng7uy
parent: john at arbash-meinel.com-20090116222734-9mgzsmtcvv9qr2mt
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 1.12-fix-short-log
timestamp: Fri 2009-01-16 16:32:24 -0600
message:
Revert one test change, and the special case of logging all-of-mainline.
modified:
bzrlib/log.py log.py-20050505065812-c40ce11702fe5fb1
bzrlib/tests/test_log.py testlog.py-20050728115707-1a514809d7d49309
------------------------------------------------------------
revno: 3943.4.2
revision-id: john at arbash-meinel.com-20090116222734-9mgzsmtcvv9qr2mt
parent: john at arbash-meinel.com-20090116221614-k8su03l5d22tq6iv
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 1.12-fix-short-log
timestamp: Fri 2009-01-16 16:27:34 -0600
message:
Add a test case which exercises this code path.
It turns out that you need --short *and* a revision range.
modified:
bzrlib/tests/test_log.py testlog.py-20050728115707-1a514809d7d49309
------------------------------------------------------------
revno: 3943.4.1
revision-id: john at arbash-meinel.com-20090116221614-k8su03l5d22tq6iv
parent: pqm at pqm.ubuntu.com-20090115233242-4bxyn4zcj2a0ksfk
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 1.12-fix-short-log
timestamp: Fri 2009-01-16 16:16:14 -0600
message:
When testing if we should show merges, use 'not' rather than 'is False'
modified:
bzrlib/log.py log.py-20050505065812-c40ce11702fe5fb1
=== modified file 'bzrlib/tests/test_log.py'
--- a/bzrlib/tests/test_log.py 2008-12-12 03:45:03 +0000
+++ b/bzrlib/tests/test_log.py 2009-01-16 22:32:24 +0000
@@ -319,6 +319,44 @@
""",
logfile.getvalue())
+ def test_short_log_with_merges_and_range(self):
+ wt = self.make_branch_and_memory_tree('.')
+ wt.lock_write()
+ self.addCleanup(wt.unlock)
+ wt.add('')
+ wt.commit('rev-1', rev_id='rev-1',
+ timestamp=1132586655, timezone=36000,
+ committer='Joe Foo <joe at foo.com>')
+ wt.commit('rev-merged', rev_id='rev-2a',
+ timestamp=1132586700, timezone=36000,
+ committer='Joe Foo <joe at foo.com>')
+ wt.branch.set_last_revision_info(1, 'rev-1')
+ wt.set_parent_ids(['rev-1', 'rev-2a'])
+ wt.commit('rev-2b', rev_id='rev-2b',
+ timestamp=1132586800, timezone=36000,
+ committer='Joe Foo <joe at foo.com>')
+ wt.commit('rev-3a', rev_id='rev-3a',
+ timestamp=1132586800, timezone=36000,
+ committer='Joe Foo <joe at foo.com>')
+ wt.branch.set_last_revision_info(2, 'rev-2b')
+ wt.set_parent_ids(['rev-2b', 'rev-3a'])
+ wt.commit('rev-3b', rev_id='rev-3b',
+ timestamp=1132586800, timezone=36000,
+ committer='Joe Foo <joe at foo.com>')
+ logfile = self.make_utf8_encoded_stringio()
+ formatter = log.ShortLogFormatter(to_file=logfile)
+ log.show_log(wt.branch, formatter,
+ start_revision=2, end_revision=3)
+ self.assertEqualDiff("""\
+ 3 Joe Foo\t2005-11-22 [merge]
+ rev-3b
+
+ 2 Joe Foo\t2005-11-22 [merge]
+ rev-2b
+
+""",
+ logfile.getvalue())
+
def test_short_log_single_merge_revision(self):
wt = self.make_branch_and_memory_tree('.')
wt.lock_write()
More information about the bazaar-commits
mailing list