18
18
from cStringIO import StringIO
21
from bzrlib import errors, tests
26
22
from bzrlib.merge_directive import MergeDirective2
28
24
from bzrlib.plugins.gtk.diff import (
307
303
[('a-id', 'a', 'removed', 'a'),
308
304
('b-id', 'b', 'removed', 'b/'),
311
def test_status_missing_file(self):
312
this = self.make_branch_and_tree('this')
313
self.build_tree(['this/foo'])
314
this.add(['foo'], ['foo-id'])
317
other = this.bzrdir.sprout('other').open_workingtree()
319
os.remove('this/foo')
320
this.remove('foo', force=True)
321
this.commit('remove')
323
f = open('other/foo', 'wt')
325
f.write('Modified\n')
328
other.commit('modified')
330
this.merge_from_branch(other.branch)
331
conflicts.resolve(this)
333
self.assertStatusEqual(
334
[('foo-id', 'foo.OTHER', 'missing', 'foo.OTHER'),],
337
def test_status_missing_directory(self):
338
this = self.make_branch_and_tree('this')
339
self.build_tree(['this/foo/', 'this/foo/bar'])
340
this.add(['foo', 'foo/bar'], ['foo-id', 'bar-id'])
343
other = this.bzrdir.sprout('other').open_workingtree()
345
os.remove('this/foo/bar')
347
this.remove('foo', force=True)
348
this.commit('remove')
350
f = open('other/foo/bar', 'wt')
352
f.write('Modified\n')
355
other.commit('modified')
357
this.merge_from_branch(other.branch)
358
conflicts.resolve(this)
360
self.assertStatusEqual(
361
[('foo-id', u'foo', 'added', u'foo/'),
362
('bar-id', u'foo/bar.OTHER', 'missing', u'foo/bar.OTHER'),],