/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_merge.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-04-06 16:28:20 UTC
  • mfrom: (1551.19.32 Aaron's mergeable stuff)
  • Revision ID: pqm@pqm.ubuntu.com-20080406162820-yto4yesv7cnrybbt
Don't traceback when adding files to a deleted root (abentley,
        #210092)

Show diffs side-by-side

added added

removed removed

Lines of Context:
450
450
        finally:
451
451
            tree_file.close()
452
452
 
 
453
    def test_merge_add_into_deleted_root(self):
 
454
        # Yes, people actually do this.  And report bugs if it breaks.
 
455
        source = self.make_branch_and_tree('source', format='rich-root-pack')
 
456
        self.build_tree(['source/foo/'])
 
457
        source.add('foo', 'foo-id')
 
458
        source.commit('Add foo')
 
459
        target = source.bzrdir.sprout('target').open_workingtree()
 
460
        subtree = target.extract('foo-id')
 
461
        subtree.commit('Delete root')
 
462
        self.build_tree(['source/bar'])
 
463
        source.add('bar', 'bar-id')
 
464
        source.commit('Add bar')
 
465
        subtree.merge_from_branch(source.branch)
 
466
 
453
467
 
454
468
class TestPlanMerge(TestCaseWithMemoryTransport):
455
469