344
344
assert os.path.exists('sub/a.txt.OTHER')
345
345
assert os.path.exists('sub/a.txt.BASE')
347
def test_merge_with_missing_file(self):
348
"""Merge handles missing file conflicts"""
352
print >> file('sub/a.txt', 'wb'), "hello"
353
print >> file('b.txt', 'wb'), "hello"
354
print >> file('sub/c.txt', 'wb'), "hello"
357
self.runbzr(('commit', '-m', 'added a'))
358
self.runbzr('branch . ../b')
359
print >> file('sub/a.txt', 'ab'), "there"
360
print >> file('b.txt', 'ab'), "there"
361
print >> file('sub/c.txt', 'ab'), "there"
362
self.runbzr(('commit', '-m', 'Added there'))
363
os.unlink('sub/a.txt')
364
os.unlink('sub/c.txt')
367
self.runbzr(('commit', '-m', 'Removed a.txt'))
369
print >> file('sub/a.txt', 'ab'), "something"
370
print >> file('b.txt', 'ab'), "something"
371
print >> file('sub/c.txt', 'ab'), "something"
372
self.runbzr(('commit', '-m', 'Modified a.txt'))
373
self.runbzr('merge ../a/')
374
assert os.path.exists('sub/a.txt.THIS')
375
assert os.path.exists('sub/a.txt.BASE')
377
self.runbzr('merge ../b/')
378
assert os.path.exists('sub/a.txt.OTHER')
379
assert os.path.exists('sub/a.txt.BASE')
381
347
def test_pull(self):
382
348
"""Pull changes from one branch to another."""