~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_revert.py

  • Committer: Aaron Bentley
  • Date: 2007-11-26 20:00:31 UTC
  • mto: (1551.19.24 Aaron's mergeable stuff)
  • mto: This revision was merged to the branch mainline in revision 3028.
  • Revision ID: abentley@panoramicfeedback.com-20071126200031-bf33kxb528sokzsl
Update from review

Show diffs side-by-side

added added

removed removed

Lines of Context:
135
135
 
136
136
    def test_revert_file_in_deleted_dir(self):
137
137
        tree = self.make_branch_and_tree('.')
138
 
        self.build_tree(['dir/', 'dir/file'])
139
 
        tree.add(['dir', 'dir/file'])
140
 
        tree.commit("Added file")
141
 
        os.unlink('dir/file')
 
138
        self.build_tree(['dir/', 'dir/file1', 'dir/file2'])
 
139
        tree.add(['dir', 'dir/file1', 'dir/file2'],
 
140
                 ['dir-id', 'file1-id', 'file2-id'])
 
141
        tree.commit("Added files")
 
142
        os.unlink('dir/file1')
 
143
        os.unlink('dir/file2')
142
144
        os.rmdir('dir')
143
 
        tree.remove(['dir/', 'dir/file'])
144
 
        tree.revert(['dir/file'])
145
 
        self.failUnlessExists('dir/file')
 
145
        tree.remove(['dir/', 'dir/file1', 'dir/file2'])
 
146
        tree.revert(['dir/file1'])
 
147
        self.failUnlessExists('dir/file1')
 
148
        self.failIfExists('dir/file2')
 
149
        self.assertEqual('dir-id', tree.path2id('dir'))