174
177
def test_merges_are_indented_by_level(self):
176
179
out,err = self.run_bzr('log')
177
# the log will look something like:
178
# self.assertEqual("""\
179
#------------------------------------------------------------
181
#committer: Robert Collins <foo@example.com>
183
#timestamp: Tue 2006-03-28 22:31:40 +1100
186
# ------------------------------------------------------------
188
# committer: Robert Collins <foo@example.com>
190
# timestamp: Tue 2006-03-28 22:31:40 +1100
193
# ------------------------------------------------------------
195
# committer: Robert Collins <foo@example.com>
196
# branch nick: smallerchild
197
# timestamp: Tue 2006-03-28 22:31:40 +1100
200
# ------------------------------------------------------------
202
# committer: Robert Collins <foo@example.com>
204
# timestamp: Tue 2006-03-28 22:31:40 +1100
207
#------------------------------------------------------------
209
#committer: Robert Collins <foo@example.com>
211
#timestamp: Tue 2006-03-28 22:31:39 +1100
215
# but we dont have a nice pattern matcher hooked up yet, so:
216
# we check for the indenting of the commit message and the
218
self.assertTrue('revno: 2' in out)
219
self.assertTrue(' merge branch 1' in out)
220
self.assertTrue(' revno: 1.1.2' in out)
221
self.assertTrue(' merge branch 2' in out)
222
self.assertTrue(' revno: 1.1.1.1' in out)
223
self.assertTrue(' branch 2' in out)
224
self.assertTrue(' revno: 1.1.1' in out)
225
self.assertTrue(' branch 1' in out)
226
self.assertTrue('revno: 1\n' in out)
227
self.assertTrue(' first post' in out)
228
180
self.assertEqual('', err)
181
log = normalize_log(out)
182
self.assertEqualDiff(log, """\
183
------------------------------------------------------------
185
committer: Lorem Ipsum <test@example.com>
190
------------------------------------------------------------
192
committer: Lorem Ipsum <test@example.com>
197
------------------------------------------------------------
199
committer: Lorem Ipsum <test@example.com>
200
branch nick: smallerchild
204
------------------------------------------------------------
206
committer: Lorem Ipsum <test@example.com>
211
------------------------------------------------------------
213
committer: Lorem Ipsum <test@example.com>
230
220
def test_merges_single_merge_rev(self):
232
222
out,err = self.run_bzr('log -r1.1.2')
233
# the log will look something like:
234
# self.assertEqual("""\
235
#------------------------------------------------------------
237
#committer: Robert Collins <foo@example.com>
239
#timestamp: Tue 2006-03-28 22:31:40 +1100
242
# ------------------------------------------------------------
244
# committer: Robert Collins <foo@example.com>
245
# branch nick: smallerchild
246
# timestamp: Tue 2006-03-28 22:31:40 +1100
250
# but we dont have a nice pattern matcher hooked up yet, so:
251
# we check for the indenting of the commit message and the
253
self.assertTrue('revno: 2' not in out)
254
self.assertTrue(' merge branch 1' not in out)
255
self.assertTrue('revno: 1.1.2' in out)
256
self.assertTrue(' merge branch 2' in out)
257
self.assertTrue(' revno: 1.1.1.1' in out)
258
self.assertTrue(' branch 2' in out)
259
self.assertTrue('revno: 1.1.1\n' not in out)
260
self.assertTrue(' branch 1' not in out)
261
self.assertTrue('revno: 1\n' not in out)
262
self.assertTrue(' first post' not in out)
263
223
self.assertEqual('', err)
224
log = normalize_log(out)
225
self.assertEqualDiff(log, """\
226
------------------------------------------------------------
228
committer: Lorem Ipsum <test@example.com>
233
------------------------------------------------------------
235
committer: Lorem Ipsum <test@example.com>
236
branch nick: smallerchild
265
242
def test_merges_partial_range(self):
267
244
out,err = self.run_bzr('log -r1.1.1..1.1.2')
268
# the log will look something like:
269
# self.assertEqual("""\
270
#------------------------------------------------------------
272
#committer: Robert Collins <foo@example.com>
274
#timestamp: Tue 2006-03-28 22:31:40 +1100
277
# ------------------------------------------------------------
279
# committer: Robert Collins <foo@example.com>
280
# branch nick: smallerchild
281
# timestamp: Tue 2006-03-28 22:31:40 +1100
284
#------------------------------------------------------------
286
#committer: Robert Collins <foo@example.com>
288
#timestamp: Tue 2006-03-28 22:31:40 +1100
292
# but we dont have a nice pattern matcher hooked up yet, so:
293
# we check for the indenting of the commit message and the
295
self.assertTrue('revno: 2' not in out)
296
self.assertTrue(' merge branch 1' not in out)
297
self.assertTrue('revno: 1.1.2' in out)
298
self.assertTrue(' merge branch 2' in out)
299
self.assertTrue(' revno: 1.1.1.1' in out)
300
self.assertTrue(' branch 2' in out)
301
self.assertTrue('revno: 1.1.1' in out)
302
self.assertTrue(' branch 1' in out)
303
self.assertTrue('revno: 1\n' not in out)
304
self.assertTrue(' first post' not in out)
305
245
self.assertEqual('', err)
246
log = normalize_log(out)
247
self.assertEqualDiff(log, """\
248
------------------------------------------------------------
250
committer: Lorem Ipsum <test@example.com>
255
------------------------------------------------------------
257
committer: Lorem Ipsum <test@example.com>
258
branch nick: smallerchild
262
------------------------------------------------------------
264
committer: Lorem Ipsum <test@example.com>
308
272
class TestLogEncodings(TestCaseInTempDir):