188
191
def test_merges_are_indented_by_level(self):
190
193
out,err = self.run_bzr('log')
191
# the log will look something like:
192
# self.assertEqual("""\
193
#------------------------------------------------------------
195
#committer: Robert Collins <foo@example.com>
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>
210
# branch nick: smallerchild
211
# timestamp: Tue 2006-03-28 22:31:40 +1100
214
# ------------------------------------------------------------
216
# committer: Robert Collins <foo@example.com>
218
# timestamp: Tue 2006-03-28 22:31:40 +1100
221
#------------------------------------------------------------
223
#committer: Robert Collins <foo@example.com>
225
#timestamp: Tue 2006-03-28 22:31:39 +1100
229
# but we dont have a nice pattern matcher hooked up yet, so:
230
# we check for the indenting of the commit message and the
232
self.assertTrue('revno: 2' in out)
233
self.assertTrue(' merge branch 1' in out)
234
self.assertTrue(' revno: 1.1.2' in out)
235
self.assertTrue(' merge branch 2' in out)
236
self.assertTrue(' revno: 1.1.1.1' in out)
237
self.assertTrue(' branch 2' in out)
238
self.assertTrue(' revno: 1.1.1' in out)
239
self.assertTrue(' branch 1' in out)
240
self.assertTrue('revno: 1\n' in out)
241
self.assertTrue(' first post' in out)
242
194
self.assertEqual('', err)
195
log = normalize_log(out)
196
self.assertEqualDiff(log, """\
197
------------------------------------------------------------
199
committer: Lorem Ipsum <test@example.com>
204
------------------------------------------------------------
206
committer: Lorem Ipsum <test@example.com>
211
------------------------------------------------------------
213
committer: Lorem Ipsum <test@example.com>
214
branch nick: smallerchild
218
------------------------------------------------------------
220
committer: Lorem Ipsum <test@example.com>
225
------------------------------------------------------------
227
committer: Lorem Ipsum <test@example.com>
244
234
def test_merges_single_merge_rev(self):
246
236
out,err = self.run_bzr('log -r1.1.2')
247
# the log will look something like:
248
# self.assertEqual("""\
249
#------------------------------------------------------------
251
#committer: Robert Collins <foo@example.com>
253
#timestamp: Tue 2006-03-28 22:31:40 +1100
256
# ------------------------------------------------------------
258
# committer: Robert Collins <foo@example.com>
259
# branch nick: smallerchild
260
# timestamp: Tue 2006-03-28 22:31:40 +1100
264
# but we dont have a nice pattern matcher hooked up yet, so:
265
# we check for the indenting of the commit message and the
267
self.assertTrue('revno: 2' not in out)
268
self.assertTrue(' merge branch 1' not in out)
269
self.assertTrue('revno: 1.1.2' in out)
270
self.assertTrue(' merge branch 2' in out)
271
self.assertTrue(' revno: 1.1.1.1' in out)
272
self.assertTrue(' branch 2' in out)
273
self.assertTrue('revno: 1.1.1\n' not in out)
274
self.assertTrue(' branch 1' not in out)
275
self.assertTrue('revno: 1\n' not in out)
276
self.assertTrue(' first post' not in out)
277
237
self.assertEqual('', err)
238
log = normalize_log(out)
239
self.assertEqualDiff(log, """\
240
------------------------------------------------------------
242
committer: Lorem Ipsum <test@example.com>
247
------------------------------------------------------------
249
committer: Lorem Ipsum <test@example.com>
250
branch nick: smallerchild
279
256
def test_merges_partial_range(self):
281
258
out,err = self.run_bzr('log -r1.1.1..1.1.2')
282
# the log will look something like:
283
# self.assertEqual("""\
284
#------------------------------------------------------------
286
#committer: Robert Collins <foo@example.com>
288
#timestamp: Tue 2006-03-28 22:31:40 +1100
291
# ------------------------------------------------------------
293
# committer: Robert Collins <foo@example.com>
294
# branch nick: smallerchild
295
# timestamp: Tue 2006-03-28 22:31:40 +1100
298
#------------------------------------------------------------
300
#committer: Robert Collins <foo@example.com>
302
#timestamp: Tue 2006-03-28 22:31:40 +1100
306
# but we dont have a nice pattern matcher hooked up yet, so:
307
# we check for the indenting of the commit message and the
309
self.assertTrue('revno: 2' not in out)
310
self.assertTrue(' merge branch 1' not in out)
311
self.assertTrue('revno: 1.1.2' in out)
312
self.assertTrue(' merge branch 2' in out)
313
self.assertTrue(' revno: 1.1.1.1' in out)
314
self.assertTrue(' branch 2' in out)
315
self.assertTrue('revno: 1.1.1' in out)
316
self.assertTrue(' branch 1' in out)
317
self.assertTrue('revno: 1\n' not in out)
318
self.assertTrue(' first post' not in out)
319
259
self.assertEqual('', err)
260
log = normalize_log(out)
261
self.assertEqualDiff(log, """\
262
------------------------------------------------------------
264
committer: Lorem Ipsum <test@example.com>
269
------------------------------------------------------------
271
committer: Lorem Ipsum <test@example.com>
272
branch nick: smallerchild
276
------------------------------------------------------------
278
committer: Lorem Ipsum <test@example.com>
321
285
def test_merges_nonsupporting_formatter(self):