# HG changeset patch # User Eduard-Cristian Stefan # Date 2012-06-08 02:37:06 # Node ID 46ccd44dd65ba35f8102a38635f37caf16cd69c2 # Parent cfd892b7569f9abe6b202a55fb5c869811029444 test-convert-git: remove the read-only attribute of repository files Git object files are stored read-only in the filesystem. Trying to remove a read-only file on windows will fail with access denied, so we have to make them writeable before they can be removed. diff --git a/tests/test-convert-git.t b/tests/test-convert-git.t --- a/tests/test-convert-git.t +++ b/tests/test-convert-git.t @@ -283,9 +283,12 @@ damage git repository and convert again $ cat > damage.py < import os + > import stat > for root, dirs, files in os.walk('git-repo4/.git/objects'): > if files: > path = os.path.join(root, files[0]) + > if os.name == 'nt': + > os.chmod(path, stat.S_IWUSR) > os.remove(path) > break > EOF