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 (
 
 
308
303
            [('a-id', 'a', 'removed', 'a'),
 
309
304
             ('b-id', 'b', 'removed', 'b/'),
 
312
 
    def test_status_missing_file(self):
 
313
 
        this = self.make_branch_and_tree('this')
 
314
 
        self.build_tree(['this/foo'])
 
315
 
        this.add(['foo'], ['foo-id'])
 
318
 
        other = this.bzrdir.sprout('other').open_workingtree()
 
320
 
        os.remove('this/foo')
 
321
 
        this.remove('foo', force=True)
 
322
 
        this.commit('remove')
 
324
 
        f = open('other/foo', 'wt')
 
326
 
            f.write('Modified\n')
 
329
 
        other.commit('modified')
 
331
 
        this.merge_from_branch(other.branch)
 
332
 
        conflicts.resolve(this)
 
334
 
        self.assertStatusEqual(
 
335
 
            [('foo-id', 'foo.OTHER', 'missing', 'foo.OTHER'),],
 
338
 
    def test_status_missing_directory(self):
 
339
 
        this = self.make_branch_and_tree('this')
 
340
 
        self.build_tree(['this/foo/', 'this/foo/bar'])
 
341
 
        this.add(['foo', 'foo/bar'], ['foo-id', 'bar-id'])
 
344
 
        other = this.bzrdir.sprout('other').open_workingtree()
 
346
 
        os.remove('this/foo/bar')
 
348
 
        this.remove('foo', force=True)
 
349
 
        this.commit('remove')
 
351
 
        f = open('other/foo/bar', 'wt')
 
353
 
            f.write('Modified\n')
 
356
 
        other.commit('modified')
 
358
 
        this.merge_from_branch(other.branch)
 
359
 
        conflicts.resolve(this)
 
361
 
        self.assertStatusEqual(
 
362
 
            [('foo-id', u'foo', 'added', u'foo/'),
 
363
 
             ('bar-id', u'foo/bar.OTHER', 'missing', u'foo/bar.OTHER'),],