~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_merge.py

  • Committer: Aaron Bentley
  • Date: 2005-11-26 01:32:18 UTC
  • mto: (1185.72.2 bzr.dev)
  • mto: This revision was merged to the branch mainline in revision 1518.
  • Revision ID: aaron.bentley@utoronto.ca-20051126013218-9c8e1f00ccba641e
Added test for renaming both parent and child

Show diffs side-by-side

added added

removed removed

Lines of Context:
63
63
        tree.rename_one('name1', 'name2')
64
64
        os.unlink('name2')
65
65
        transform_tree(tree, b.basis_tree())
 
66
 
 
67
    def test_layered_rename(self):
 
68
        """Rename both child and parent at same time"""
 
69
        b = Branch.initialize('.')
 
70
        tree = b.working_tree()
 
71
        os.mkdir('dirname1')
 
72
        tree.add('dirname1')
 
73
        filename = os.path.join('dirname1', 'name1')
 
74
        file(filename, 'wb').write('Hello')
 
75
        tree.add(filename)
 
76
        tree.commit(message="hello")
 
77
        filename2 = os.path.join('dirname1', 'name2')
 
78
        tree.rename_one(filename, filename2)
 
79
        tree.rename_one('dirname1', 'dirname2')
 
80
        transform_tree(tree, b.basis_tree())