~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_workingtree.py

Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
309
309
        self.assertEqual(['t', 'u', 't', 'u'], tree._locks)
310
310
 
311
311
 
 
312
class TestRevert(TestCaseWithTransport):
 
313
 
 
314
    def test_revert_conflicts_recursive(self):
 
315
        this_tree = self.make_branch_and_tree('this-tree')
 
316
        self.build_tree_contents([('this-tree/foo/',),
 
317
                                  ('this-tree/foo/bar', 'bar')])
 
318
        this_tree.add(['foo', 'foo/bar'])
 
319
        this_tree.commit('created foo/bar')
 
320
        other_tree = this_tree.bzrdir.sprout('other-tree').open_workingtree()
 
321
        self.build_tree_contents([('other-tree/foo/bar', 'baz')])
 
322
        other_tree.commit('changed bar')
 
323
        self.build_tree_contents([('this-tree/foo/bar', 'qux')])
 
324
        this_tree.commit('changed qux')
 
325
        this_tree.merge_from_branch(other_tree.branch)
 
326
        self.assertEqual(1, len(this_tree.conflicts()))
 
327
        this_tree.revert(['foo'])
 
328
        self.assertEqual(0, len(this_tree.conflicts()))
 
329
 
 
330
 
312
331
class TestAutoResolve(TestCaseWithTransport):
313
332
 
314
333
    def test_auto_resolve(self):