/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: Canonical.com Patch Queue Manager
  • Date: 2009-07-15 23:13:57 UTC
  • mfrom: (4536.2.2 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20090715231357-3abvg8h62kjh3zak
(robertc) Fix bugs 187207,
        282402 - small but annoying bugs in commit. (Robert Collins

Show diffs side-by-side

added added

removed removed

Lines of Context:
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('.')