[PATCH 2 of 2] test-convert-git: remove the read-only attribute of repository files
alexandrul.ct at gmail.com
alexandrul.ct at gmail.com
Fri Jun 8 10:23:41 CDT 2012
# HG changeset patch
# User Eduard-Cristian Stefan <alexandrul.ct at gmail.com>
# Date 1339123026 -10800
# Node ID 9b91d3b4fc4cdcb28467a731e1d59adf67fccb5a
# Parent b52a0e4efa04b7859f56c4e74b158e1563d08ae5
test-convert-git: remove the read-only attribute of repository files
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,11 +283,17 @@
$ cat > damage.py <<EOF
> import os
+ > import stat
> for root, dirs, files in os.walk('git-repo4/.git/objects'):
> if files:
> path = os.path.join(root, files[0])
- > os.remove(path)
- > break
+ > try:
+ > if os.name == 'nt':
+ > os.chmod(path, stat.S_IWRITE)
+ > os.remove(path)
+ > break
+ > except:
+ > continue
> EOF
$ python damage.py
$ hg convert git-repo4 git-repo4-broken-hg 2>&1 | \
More information about the Mercurial-devel
mailing list