From 46c9a0df4403266a320059eaa66e7dce7b3d9ac4 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Thu, 5 Nov 2009 20:09:35 +0100 Subject: cmd: added clear_cache method now used by test repo decorators to be sure persistent commands are killed before trying to remove the directory. Unfortunately, it still claims someone has opened the file. handle.exe does not show anyone, so what is happening here ? Is it just a windows odity ? If nothing helps I could just keep the temp data, but lets do some more testing first --- test/testlib/helper.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/testlib') diff --git a/test/testlib/helper.py b/test/testlib/helper.py index 27c2b3d9..5599f05e 100644 --- a/test/testlib/helper.py +++ b/test/testlib/helper.py @@ -82,6 +82,7 @@ def with_bare_rw_repo(func): try: return func(self, rw_repo) finally: + rw_repo.git.clear_cache() shutil.rmtree(repo_dir) # END cleanup # END bare repo creator @@ -107,6 +108,7 @@ def with_rw_repo(working_tree_ref): try: return func(self, rw_repo) finally: + rw_repo.git.clear_cache() shutil.rmtree(repo_dir) # END cleanup # END rw repo creator @@ -179,6 +181,8 @@ def with_rw_and_rw_remote_repo(working_tree_ref): try: return func(self, rw_repo, rw_remote_repo) finally: + rw_repo.git.clear_cache() + rw_remote_repo.git.clear_cache() shutil.rmtree(repo_dir) shutil.rmtree(remote_repo_dir) # END cleanup -- cgit v1.2.3