/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_workingtree.py

  • Committer: Lukáš Lalinský
  • Date: 2007-12-17 17:28:25 UTC
  • mfrom: (3120 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3123.
  • Revision ID: lalinsky@gmail.com-20071217172825-tr3pqm1mhvs3gwnn
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
94
94
        """See WorkingTreeFormat.get_format_string()."""
95
95
        return "Sample tree format."
96
96
 
97
 
    def initialize(self, a_bzrdir, revision_id=None):
 
97
    def initialize(self, a_bzrdir, revision_id=None, from_branch=None):
98
98
        """Sample branches cannot be created."""
99
99
        t = a_bzrdir.get_workingtree_transport(self)
100
100
        t.put_bytes('format', self.get_format_string())
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):