41
42
file('myfile', 'wb').write('contentsb\n')
42
43
file('my_other_file', 'wb').write('contentsb\n')
44
self.runbzr('mv mydir mydir2')
43
45
self.runbzr('commit -m change')
45
47
file('myfile', 'wb').write('contentsa2\n')
46
48
file('my_other_file', 'wb').write('contentsa2\n')
49
self.runbzr('mv mydir mydir3')
47
50
self.runbzr('commit -m change')
48
51
self.runbzr('merge ../b', retcode=1)
50
53
def test_conflicts(self):
51
54
conflicts = self.runbzr('conflicts', backtick=True)
52
self.assertEqual(len(conflicts.splitlines()), 2)
55
self.assertEqual(3, len(conflicts.splitlines()))
57
def test_conflicts_text(self):
58
conflicts = self.run_bzr('conflicts', '--text')[0].splitlines()
59
self.assertEqual(['my_other_file', 'myfile'], conflicts)
54
61
def test_resolve(self):
55
62
self.runbzr('resolve', retcode=3)
56
63
self.runbzr('resolve myfile')
57
64
conflicts = self.runbzr('conflicts', backtick=True)
58
self.assertEqual(len(conflicts.splitlines()), 1)
65
self.assertEqual(2, len(conflicts.splitlines()))
59
66
self.runbzr('resolve my_other_file')
67
self.runbzr('resolve mydir2')
60
68
conflicts = self.runbzr('conflicts', backtick=True)
61
69
self.assertEqual(len(conflicts.splitlines()), 0)