349
349
self.build_tree_contents([('this/hello', 'Hello World')])
350
350
this.commit('Add World')
351
351
this.merge_from_branch(other.branch)
352
self.assertEqual([conflicts.TextConflict('hello', None, 'hello_id')],
352
self.assertEqual([conflicts.TextConflict('hello', 'hello_id')],
353
353
this.conflicts())
354
354
this.auto_resolve()
355
self.assertEqual([conflicts.TextConflict('hello', None, 'hello_id')],
355
self.assertEqual([conflicts.TextConflict('hello', 'hello_id')],
356
356
this.conflicts())
357
357
self.build_tree_contents([('this/hello', '<<<<<<<')])
358
358
this.auto_resolve()
359
self.assertEqual([conflicts.TextConflict('hello', None, 'hello_id')],
359
self.assertEqual([conflicts.TextConflict('hello', 'hello_id')],
360
360
this.conflicts())
361
361
self.build_tree_contents([('this/hello', '=======')])
362
362
this.auto_resolve()
363
self.assertEqual([conflicts.TextConflict('hello', None, 'hello_id')],
363
self.assertEqual([conflicts.TextConflict('hello', 'hello_id')],
364
364
this.conflicts())
365
365
self.build_tree_contents([('this/hello', '\n>>>>>>>')])
366
366
remaining, resolved = this.auto_resolve()
367
self.assertEqual([conflicts.TextConflict('hello', None, 'hello_id')],
367
self.assertEqual([conflicts.TextConflict('hello', 'hello_id')],
368
368
this.conflicts())
369
369
self.assertEqual([], resolved)
370
370
self.build_tree_contents([('this/hello', 'hELLO wORLD')])
371
371
remaining, resolved = this.auto_resolve()
372
372
self.assertEqual([], this.conflicts())
373
self.assertEqual([conflicts.TextConflict('hello', None, 'hello_id')],
373
self.assertEqual([conflicts.TextConflict('hello', 'hello_id')],
375
375
self.failIfExists('this/hello.BASE')
378
378
tree = self.make_branch_and_tree('tree')
379
379
self.build_tree(['tree/hello/'])
380
380
tree.add('hello', 'hello-id')
381
file_conflict = conflicts.TextConflict('file', None, 'hello-id')
381
file_conflict = conflicts.TextConflict('file', 'hello-id')
382
382
tree.set_conflicts(conflicts.ConflictList([file_conflict]))
383
383
tree.auto_resolve()