[PATCH] test-convert-git: remove the read-only attribute of repository files
Adrian Buehlmann
adrian at cadifra.com
Fri Jun 8 15:05:50 UTC 2012
On 2012-06-08 08:07, Eduard-Cristian Stefan wrote:
> # 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 | \
>
>
Test passes on Ubuntu Linux.
More information about the Mercurial-devel
mailing list