331
331
assert os.path.exists('sub/a.txt.OTHER')
332
332
assert os.path.exists('sub/a.txt.BASE')
334
def test_merge_with_missing_file(self):
335
"""Merge handles missing file conflicts"""
339
print >> file('sub/a.txt', 'wb'), "hello"
340
print >> file('b.txt', 'wb'), "hello"
341
print >> file('sub/c.txt', 'wb'), "hello"
344
self.runbzr(('commit', '-m', 'added a'))
345
self.runbzr('branch . ../b')
346
print >> file('sub/a.txt', 'ab'), "there"
347
print >> file('b.txt', 'ab'), "there"
348
print >> file('sub/c.txt', 'ab'), "there"
349
self.runbzr(('commit', '-m', 'Added there'))
350
os.unlink('sub/a.txt')
351
os.unlink('sub/c.txt')
354
self.runbzr(('commit', '-m', 'Removed a.txt'))
356
print >> file('sub/a.txt', 'ab'), "something"
357
print >> file('b.txt', 'ab'), "something"
358
print >> file('sub/c.txt', 'ab'), "something"
359
self.runbzr(('commit', '-m', 'Modified a.txt'))
360
self.runbzr('merge ../a/')
361
assert os.path.exists('sub/a.txt.THIS')
362
assert os.path.exists('sub/a.txt.BASE')
364
self.runbzr('merge ../b/')
365
assert os.path.exists('sub/a.txt.OTHER')
366
assert os.path.exists('sub/a.txt.BASE')
334
368
def test_pull(self):
335
369
"""Pull changes from one branch to another."""