[PATCH 6 of 6 V1] opener: use util.unlink (issue2524)
Adrian Buehlmann
adrian at cadifra.com
Mon Jan 17 20:02:12 UTC 2011
On 2011-01-11 14:42, Adrian Buehlmann wrote:
> # HG changeset patch
> # User Adrian Buehlmann <adrian at cadifra.com>
> # Date 1294751416 -3600
> # Node ID a595780a2600f7aefdb74f909704c28247fda9e6
> # Parent 883a56de3fe6ae2ccb5eed130c07c5a03e51710c
> opener: use util.unlink (issue2524)
>
> diff --git a/mercurial/util.py b/mercurial/util.py
> --- a/mercurial/util.py
> +++ b/mercurial/util.py
> @@ -911,7 +911,7 @@ class opener(object):
> return atomictempfile(f, mode, self.createmode)
> try:
> if 'w' in mode:
> - os.unlink(f)
> + unlink(f)
> nlink = 0
> else:
> # nlinks() may behave differently for files on Windows
BTW, this one would be a pretty big step towards making Mercurial work
with the majority of virus scanners on Windows...
More information about the Mercurial-devel
mailing list