442
442
self.runbzr('commit -m this')
444
def test_remerge(self):
445
"""Remerge command works as expected"""
446
self.create_conflicts()
447
self.runbzr('merge ../other --show-base', retcode=1)
448
conflict_text = file('hello').read()
449
assert '|||||||' in conflict_text
450
assert 'hi world' in conflict_text
451
self.runbzr('remerge', retcode=1)
452
conflict_text = file('hello').read()
453
assert '|||||||' not in conflict_text
454
assert 'hi world' not in conflict_text
455
os.unlink('hello.OTHER')
456
os.unlink('question.OTHER')
457
self.runbzr('remerge jello --merge-type weave', retcode=3)
458
self.runbzr('remerge hello --merge-type weave', retcode=1)
459
assert os.path.exists('hello.OTHER')
460
self.assertIs(False, os.path.exists('question.OTHER'))
461
file_id = self.runbzr('file-id hello')
462
file_id = self.runbzr('file-id hello.THIS', retcode=3)
463
self.runbzr('remerge --merge-type weave', retcode=1)
464
assert os.path.exists('hello.OTHER')
465
assert not os.path.exists('hello.BASE')
466
assert '|||||||' not in conflict_text
467
assert 'hi world' not in conflict_text
468
self.runbzr('remerge . --merge-type weave --show-base', retcode=3)
469
self.runbzr('remerge . --show-base --reprocess', retcode=3)
470
self.runbzr('remerge . --merge-type weave --reprocess', retcode=1)
471
self.runbzr('remerge hello --show-base', retcode=1)
472
self.runbzr('remerge hello --reprocess', retcode=1)
473
self.runbzr('resolve --all')
474
self.runbzr('commit -m done',)
475
self.runbzr('remerge', retcode=3)
477
444
def test_status(self):
478
445
os.mkdir('branch1')
479
446
os.chdir('branch1')