~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_remove_tree.py

  • Committer: Martin Pool
  • Date: 2009-09-15 01:52:34 UTC
  • mfrom: (4685 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4689.
  • Revision ID: mbp@sourcefrog.net-20090915015234-lbvl4euj2z353zjl
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
122
122
        self.run_bzr('remove-tree branch1 --force')
123
123
        self.failIfExists('branch1/foo')
124
124
        self.failUnlessExists('branch1/bar')
 
125
 
 
126
    def test_remove_tree_pending_merges(self):
 
127
        self.run_bzr(['branch', 'branch1', 'branch2'])
 
128
        self.build_tree(['branch1/bar'])
 
129
        self.tree.add('bar')
 
130
        self.tree.commit('2')
 
131
        self.failUnlessExists('branch1/bar')
 
132
        self.run_bzr(['merge', '../branch1'], working_dir='branch2')
 
133
        self.failUnlessExists('branch2/bar')
 
134
        self.run_bzr(['revert', '.'], working_dir='branch2')
 
135
        self.failIfExists('branch2/bar')
 
136
        output = self.run_bzr_error(["Working tree .* has uncommitted changes"],
 
137
                                    'remove-tree branch2', retcode=3)
 
138
 
 
139
    def test_remove_tree_pending_merges_force(self):
 
140
        self.run_bzr(['branch', 'branch1', 'branch2'])
 
141
        self.build_tree(['branch1/bar'])
 
142
        self.tree.add('bar')
 
143
        self.tree.commit('2')
 
144
        self.failUnlessExists('branch1/bar')
 
145
        self.run_bzr(['merge', '../branch1'], working_dir='branch2')
 
146
        self.failUnlessExists('branch2/bar')
 
147
        self.run_bzr(['revert', '.'], working_dir='branch2')
 
148
        self.failIfExists('branch2/bar')
 
149
        self.run_bzr('remove-tree branch2 --force')
 
150
        self.failIfExists('branch2/foo')
 
151
        self.failIfExists('branch2/bar')