492
492
self.runbzr('commit -m this')
494
def test_remerge(self):
495
"""Remerge command works as expected"""
496
self.create_conflicts()
497
self.runbzr('merge ../other --show-base', retcode=1)
498
conflict_text = file('hello').read()
499
assert '|||||||' in conflict_text
500
assert 'hi world' in conflict_text
501
self.runbzr('remerge', retcode=1)
502
conflict_text = file('hello').read()
503
assert '|||||||' not in conflict_text
504
assert 'hi world' not in conflict_text
505
os.unlink('hello.OTHER')
506
os.unlink('question.OTHER')
507
self.runbzr('remerge jello --merge-type weave', retcode=3)
508
self.runbzr('remerge hello --merge-type weave', retcode=1)
509
assert os.path.exists('hello.OTHER')
510
self.assertIs(False, os.path.exists('question.OTHER'))
511
file_id = self.runbzr('file-id hello')
512
file_id = self.runbzr('file-id hello.THIS', retcode=3)
513
self.runbzr('remerge --merge-type weave', retcode=1)
514
assert os.path.exists('hello.OTHER')
515
assert not os.path.exists('hello.BASE')
516
assert '|||||||' not in conflict_text
517
assert 'hi world' not in conflict_text
518
self.runbzr('remerge . --merge-type weave --show-base', retcode=3)
519
self.runbzr('remerge . --show-base --reprocess', retcode=3)
520
self.runbzr('remerge . --merge-type weave --reprocess', retcode=1)
521
self.runbzr('remerge hello --show-base', retcode=1)
522
self.runbzr('remerge hello --reprocess', retcode=1)
523
self.runbzr('resolve --all')
524
self.runbzr('commit -m done',)
525
self.runbzr('remerge', retcode=3)
527
494
def test_status(self):
528
495
os.mkdir('branch1')
529
496
os.chdir('branch1')