~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/blackbox.py

  • Committer: Aaron Bentley
  • Date: 2005-10-01 05:57:36 UTC
  • mfrom: (1393.1.23)
  • mto: (1185.12.13)
  • mto: This revision was merged to the branch mainline in revision 1419.
  • Revision ID: aaron.bentley@utoronto.ca-20051001055736-a1bb0acdce40852a
Merge from mpool

Show diffs side-by-side

added added

removed removed

Lines of Context:
331
331
        assert os.path.exists('sub/a.txt.OTHER')
332
332
        assert os.path.exists('sub/a.txt.BASE')
333
333
 
 
334
    def test_merge_with_missing_file(self):
 
335
        """Merge handles missing file conflicts"""
 
336
        os.mkdir('a')
 
337
        os.chdir('a')
 
338
        os.mkdir('sub')
 
339
        print >> file('sub/a.txt', 'wb'), "hello"
 
340
        print >> file('b.txt', 'wb'), "hello"
 
341
        print >> file('sub/c.txt', 'wb'), "hello"
 
342
        self.runbzr('init')
 
343
        self.runbzr('add')
 
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')
 
352
        os.rmdir('sub')
 
353
        os.unlink('b.txt')
 
354
        self.runbzr(('commit', '-m', 'Removed a.txt'))
 
355
        os.chdir('../b')
 
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')
 
363
        os.chdir('../a')
 
364
        self.runbzr('merge ../b/')
 
365
        assert os.path.exists('sub/a.txt.OTHER')
 
366
        assert os.path.exists('sub/a.txt.BASE')
 
367
 
334
368
    def test_pull(self):
335
369
        """Pull changes from one branch to another."""
336
370
        os.mkdir('a')