188
def test_merge_sort_race(self):
204
self.assertSortAndIterate(graph, 'F',
205
[(0, 'F', 0, (3,), False),
206
(1, 'D', 1, (2,2,1), False),
207
(2, 'C', 1, (2,1,1), True), # XXX: Shouldn't it be merge_depth=2?
208
(3, 'B', 0, (2,), False),
209
(4, 'A', 0, (1,), True),
227
self.assertSortAndIterate(graph, 'F',
228
[(0, 'F', 0, (3,), False),
229
(1, 'D', 1, (2,1,2), False),
230
(2, 'C', 2, (2,2,1), True),
231
(3, 'X', 1, (2,1,1), True),
232
(4, 'B', 0, (2,), False),
233
(5, 'A', 0, (1,), True),
185
236
def test_merge_depth_with_nested_merges(self):
186
237
# the merge depth marker should reflect the depth of the revision
187
238
# in terms of merges out from the mainline
230
281
[(0, 'A', 0, (3,), False),
231
(1, 'B', 1, (1,2,2), False),
232
(2, 'C', 1, (1,2,1), True),
282
(1, 'B', 1, (1,3,2), False),
283
(2, 'C', 1, (1,3,1), True),
233
284
(3, 'D', 0, (2,), False),
234
285
(4, 'E', 1, (1,1,2), False),
235
(5, 'F', 2, (1,1,1,1,1), True),
286
(5, 'F', 2, (1,2,1), True),
236
287
(6, 'G', 1, (1,1,1), True),
237
288
(7, 'H', 0, (1,), True),
293
def test_dotted_revnos_with_simple_merges(self):
298
# D E F 3, 1.1.2, 1.2.1
300
# G H I 4, 1.2.2, 1.3.1
305
self.assertSortAndIterate(
320
[(0, 'L', 0, (6,), False),
321
(1, 'K', 1, (1,3,2), False),
322
(2, 'I', 1, (1,3,1), True),
323
(3, 'J', 0, (5,), False),
324
(4, 'H', 1, (1,2,2), False),
325
(5, 'F', 1, (1,2,1), True),
326
(6, 'G', 0, (4,), False),
327
(7, 'E', 1, (1,1,2), False),
328
(8, 'C', 1, (1,1,1), True),
329
(9, 'D', 0, (3,), False),
330
(10, 'B', 0, (2,), False),
331
(11, 'A', 0, (1,), True),
335
# Adding a shortcut from the first revision should not change any of
336
# the existing numbers
337
self.assertSortAndIterate(
354
[(0, 'N', 0, (7,), False),
355
(1, 'M', 1, (1,4,1), True),
356
(2, 'L', 0, (6,), False),
357
(3, 'K', 1, (1,3,2), False),
358
(4, 'I', 1, (1,3,1), True),
359
(5, 'J', 0, (5,), False),
360
(6, 'H', 1, (1,2,2), False),
361
(7, 'F', 1, (1,2,1), True),
362
(8, 'G', 0, (4,), False),
363
(9, 'E', 1, (1,1,2), False),
364
(10, 'C', 1, (1,1,1), True),
365
(11, 'D', 0, (3,), False),
366
(12, 'B', 0, (2,), False),
367
(13, 'A', 0, (1,), True),
242
372
def test_end_of_merge_not_last_revision_in_branch(self):
243
373
# within a branch only the last revision gets an
244
374
# end of merge marker.
313
443
[(0, 'A', 0, (2,), False),
314
(1, 'B', 1, (1,2,2), False),
315
(2, 'C', 2, (1,2,1,1,1), True),
316
(3, 'D', 1, (1,2,1), True),
444
(1, 'B', 1, (1,3,2), False),
445
(2, 'C', 2, (1,4,1), True),
446
(3, 'D', 1, (1,3,1), True),
317
447
(4, 'E', 1, (1,1,2), False),
318
(5, 'F', 2, (1,1,1,1,1), True),
448
(5, 'F', 2, (1,2,1), True),
319
449
(6, 'G', 1, (1,1,1), True),
320
450
(7, 'H', 0, (1,), True),