280
280
log_contents = logfile.read()
281
281
self.assertEqualDiff(log_contents, '1: Line-Log-Formatte... 2005-11-23 add a\n')
283
def test_short_log_with_merges(self):
284
wt = self.make_branch_and_memory_tree('.')
288
wt.commit('rev-1', rev_id='rev-1',
289
timestamp=1132586655, timezone=36000,
290
committer='Joe Foo <joe@foo.com>')
291
wt.commit('rev-merged', rev_id='rev-2a',
292
timestamp=1132586700, timezone=36000,
293
committer='Joe Foo <joe@foo.com>')
294
wt.set_parent_ids(['rev-1', 'rev-2a'])
295
wt.branch.set_last_revision_info(1, 'rev-1')
296
wt.commit('rev-2', rev_id='rev-2b',
297
timestamp=1132586800, timezone=36000,
298
committer='Joe Foo <joe@foo.com>')
300
formatter = ShortLogFormatter(to_file=logfile)
301
show_log(wt.branch, formatter)
303
self.assertEqualDiff("""\
304
2 Joe Foo\t2005-11-22 [merge]
307
1 Joe Foo\t2005-11-22
310
""", logfile.getvalue())
283
314
def make_tree_with_commits(self):
284
315
"""Create a tree with well-known revision ids"""
285
316
wt = self.make_branch_and_tree('tree1')