Rev 4679: FreeBSD is more strict than other OSes about deleting the working dir. in file:///home/vila/src/bzr/bugs/freebsd-regressions/

Vincent Ladeuil v.ladeuil+lp at free.fr
Mon Sep 7 09:52:04 BST 2009


At file:///home/vila/src/bzr/bugs/freebsd-regressions/

------------------------------------------------------------
revno: 4679
revision-id: v.ladeuil+lp at free.fr-20090907085204-ihbaxqrqzicf3bb9
parent: v.ladeuil+lp at free.fr-20090907084600-g2gheboken7azq5y
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: freebsd-regressions
timestamp: Mon 2009-09-07 10:52:04 +0200
message:
  FreeBSD is more strict than other OSes about deleting the working dir.
  
  * bzrlib/tests/blackbox/test_remove.py:
  (TestRemove.test_remove_changed_files_from_child_dir): Don't
  delete the working dir... It's amazing this test has never
  failed...
  
  * bzrlib/tests/blackbox/test_remove.py:
  (TestRemove.test_remove_changed_files_from_child_dir): Add a
  working_dir parameter.
-------------- next part --------------
=== modified file 'bzrlib/tests/blackbox/test_remove.py'
--- a/bzrlib/tests/blackbox/test_remove.py	2009-03-23 14:59:43 +0000
+++ b/bzrlib/tests/blackbox/test_remove.py	2009-09-07 08:52:04 +0000
@@ -61,15 +61,18 @@
         f.write("\nsome other new content!")
         f.close()
 
-    def run_bzr_remove_changed_files(self, error_regexes, files_to_remove):
+    def run_bzr_remove_changed_files(self, error_regexes, files_to_remove,
+                                     working_dir=None):
         error_regexes.extend(["Can't safely remove modified or unknown files:",
             'Use --keep to not delete them,'
             ' or --force to delete them regardless.'
             ])
         self.run_bzr_error(error_regexes,
-            ['remove'] + list(files_to_remove))
+                           ['remove'] + list(files_to_remove),
+                           working_dir=working_dir)
         #see if we can force it now
-        self.run_bzr(['remove', '--force'] + list(files_to_remove))
+        self.run_bzr(['remove', '--force'] + list(files_to_remove),
+                     working_dir=working_dir)
 
     def test_remove_new_no_files_specified(self):
         tree = self.make_branch_and_tree('.')
@@ -196,10 +199,9 @@
         self.run_bzr("commit -m 'added files'")
         self.changeFile(a)
         self.changeFile(c)
-        os.chdir('b')
-        self.run_bzr_remove_changed_files(['modified:[.\s]*a[.\s]*b/c'],
-            ['../a', 'c', '.', '../d'])
-        os.chdir('..')
+        self.run_bzr_remove_changed_files(
+            ['modified:[.\s]*a[.\s]*b/c'],
+            ['../a', 'c', '.', '../d'], working_dir='b')
         self.assertNotInWorkingTree(files)
         self.failIfExists(files)
 



More information about the bazaar-commits mailing list