Beispiel #1
0
    def write_tree(self, rev_tree, file_id_list):
        """
    Write the whole revision tree contents to our temporary directory. 
    The directory will be removed when the ScratchArea is deleted.
    """
        osutils.delete_any(self.path)
        export.export(rev_tree, self.path, format="dir")
        self._make_readonly()

        return
Beispiel #2
0
 def test_remove_deleted_files(self):
     """Check that files are removed if they don't exist any more."""
     tree = self.get_committed_tree(TestRemove.files)
     for f in TestRemove.rfiles:
         osutils.delete_any(f)
     self.assertInWorkingTree(TestRemove.files)
     self.assertPathDoesNotExist(TestRemove.files)
     tree.remove(TestRemove.files, keep_files=False)
     self.assertRemovedAndDeleted(TestRemove.files)
     tree._validate()
Beispiel #3
0
    def write_tree(self, rev_tree, file_id_list):
        """
    Write the whole revision tree contents to our temporary directory. 
    The directory will be removed when the ScratchArea is deleted.
    """
        osutils.delete_any(self.path)
        export.export(rev_tree, self.path, format='dir')
        self._make_readonly()

        return
Beispiel #4
0
 def test_remove_deleted_files(self):
     """Check that files are removed if they don't exist any more."""
     tree = self.get_committed_tree(TestRemove.files)
     for f in TestRemove.rfiles:
         osutils.delete_any(f)
     self.assertInWorkingTree(TestRemove.files)
     self.failIfExists(TestRemove.files)
     tree.remove(TestRemove.files, keep_files=False)
     self.assertRemovedAndDeleted(TestRemove.files)
     tree._validate()
Beispiel #5
0
 def test_remove_deleted_files(self):
     tree = self._make_add_and_assert_tree(files)
     self.run_bzr("commit -m 'added files'")
     my_files=[f for f in files]
     my_files.sort(reverse=True)
     for f in my_files:
         osutils.delete_any(f)
     self.assertInWorkingTree(files)
     self.failIfExists(files)
     self.run_bzr('remove ' + ' '.join(files))
     self.assertNotInWorkingTree(a)
     self.failIfExists(files)
 def test_remove_deleted_files(self):
     tree = self._make_tree_and_add(files)
     self.run_bzr("commit -m 'added files'")
     my_files = [f for f in files]
     my_files.sort(reverse=True)
     for f in my_files:
         osutils.delete_any(f)
     self.assertInWorkingTree(files)
     self.assertPathDoesNotExist(files)
     self.run_bzr('remove ' + ' '.join(files))
     self.assertNotInWorkingTree(a)
     self.assertPathDoesNotExist(files)
Beispiel #7
0
 def change_kind():
     osutils.delete_any(path)
     make_after(path)
 def change_kind():
     osutils.delete_any(path)
     make_after(path)