87
87
log = self.runbzr("log -r 1..3")[0]
88
88
self.assertEquals(self.full_log, log)
91
class TestLogMerges(ExternalBase):
93
def test_merges_are_indented_by_level(self):
94
self.build_tree(['parent/'])
95
self.run_bzr('init', 'parent')
96
self.run_bzr('commit', '-m', 'first post', '--unchanged', 'parent')
97
self.run_bzr('branch', 'parent', 'child')
98
self.run_bzr('commit', '-m', 'branch 1', '--unchanged', 'child')
99
self.run_bzr('branch', 'child', 'smallerchild')
100
self.run_bzr('commit', '-m', 'branch 2', '--unchanged', 'smallerchild')
102
self.run_bzr('merge', '../smallerchild')
103
self.run_bzr('commit', '-m', 'merge branch 2')
104
os.chdir('../parent')
105
self.run_bzr('merge', '../child')
106
self.run_bzr('commit', '-m', 'merge branch 1')
107
out,err = self.run_bzr('log')
108
# the log will look something like:
109
# self.assertEqual("""\
110
#------------------------------------------------------------
112
#committer: Robert Collins <foo@example.com>
114
#timestamp: Tue 2006-03-28 22:31:40 +1100
117
# ------------------------------------------------------------
118
# merged: foo@example.com-20060328113140-91f43cfb46dc2863
119
# committer: Robert Collins <foo@example.com>
121
# timestamp: Tue 2006-03-28 22:31:40 +1100
124
# ------------------------------------------------------------
125
# merged: foo@example.com-20060328113140-1ba24f850a0ef573
126
# committer: Robert Collins <foo@example.com>
127
# branch nick: smallerchild
128
# timestamp: Tue 2006-03-28 22:31:40 +1100
131
# ------------------------------------------------------------
132
# merged: foo@example.com-20060328113140-5749a4757a8ac792
133
# committer: Robert Collins <foo@example.com>
135
# timestamp: Tue 2006-03-28 22:31:40 +1100
138
#------------------------------------------------------------
140
#committer: Robert Collins <foo@example.com>
142
#timestamp: Tue 2006-03-28 22:31:39 +1100
146
# but we dont have a nice pattern matcher hooked up yet, so:
147
# we check for the indenting of the commit message:
148
self.assertTrue(' merge branch 1' in out)
149
self.assertTrue(' merge branch 2' in out)
150
self.assertTrue(' branch 2' in out)
151
self.assertTrue(' branch 1' in out)
152
self.assertTrue(' first post' in out)
153
self.assertEqual('', err)