441
441
self.assertEquals(out, '')
442
442
err.index('unknown command')
444
def test_conflicts(self):
445
"""Handling of merge conflicts"""
448
file('hello', 'wb').write("hi world")
449
file('answer', 'wb').write("42")
452
self.runbzr('commit -m base')
453
self.runbzr('branch . ../other')
454
self.runbzr('branch . ../this')
456
file('hello', 'wb').write("Hello.")
457
file('answer', 'wb').write("Is anyone there?")
458
self.runbzr('commit -m other')
460
file('hello', 'wb').write("Hello, world")
461
self.runbzr('mv answer question')
462
file('question', 'wb').write("What do you get when you multiply six"
464
self.runbzr('commit -m this')
465
self.runbzr('merge ../other')
466
result = self.runbzr('conflicts', backtick=1)
467
self.assertEquals(result, "hello\nquestion\n")
468
result = self.runbzr('resolve hello')
469
result = self.runbzr('conflicts', backtick=1)
470
self.assertEquals(result, "question\n")
471
result = self.runbzr('resolve --all')
472
result = self.runbzr('conflicts', backtick=1)
473
self.assertEquals(result, "")