/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/per_workingtree/test_unversion.py

  • Committer: Jonathan Lange
  • Date: 2009-12-09 09:20:42 UTC
  • mfrom: (4881 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4907.
  • Revision ID: jml@canonical.com-20091209092042-s2zgqcf8f39yzxpj
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
    errors,
21
21
    osutils,
22
22
    )
23
 
from bzrlib.tests.workingtree_implementations import TestCaseWithWorkingTree
 
23
from bzrlib.tests.per_workingtree import TestCaseWithWorkingTree
24
24
 
25
25
 
26
26
class TestUnversion(TestCaseWithWorkingTree):
37
37
        tree = self.make_branch_and_tree('.')
38
38
        self.assertRaises(errors.NoSuchId, tree.unversion, ['missing-id'])
39
39
 
 
40
    def test_unversion_parent_and_child_renamed_bug_187207(self):
 
41
        # When unversioning dirstate trees show a bug in dealing with
 
42
        # unversioning children of reparented children of unversioned
 
43
        # paths when relocation entries are present and the relocation
 
44
        # points later into the dirstate.
 
45
        tree = self.make_branch_and_tree(['.'])
 
46
        self.build_tree(['del/', 'del/sub/', 'del/sub/b'])
 
47
        tree.add(['del', 'del/sub', 'del/sub/b'], ['del', 'sub', 'b'])
 
48
        tree.commit('setup')
 
49
        tree.rename_one('del/sub', 'sub')
 
50
        self.assertEqual('sub/b', tree.id2path('b'))
 
51
        tree.unversion(['del', 'b'])
 
52
        self.assertRaises(errors.NoSuchId, tree.id2path, 'b')
 
53
 
40
54
    def test_unversion_several_files(self):
41
55
        """After unversioning several files, they should not be versioned."""
42
56
        tree = self.make_branch_and_tree('.')