[PATCH V2 RESEND] win32: improve the performance of win32.unlink() over CIFS
Adrian Buehlmann
adrian at cadifra.com
Thu Feb 20 05:02:48 CST 2014
On 2014-02-19 23:03, Matt Mackall wrote:
> On Mon, 2014-02-17 at 12:02 +0900, Kaz Nishimura wrote:
>> # HG changeset patch
>> # User Kaz Nishimura <kazssym at vx68k.org>
>> # Date 1381984037 -32400
>> # Thu Oct 17 13:27:17 2013 +0900
>> # Node ID 95a976e04589e3d33f69805dff56a249bee250ae
>> # Parent 0e2877f8605dcaf4fdf2ab7e0046f1f6f80161dd
>> win32: improve the performance of win32.unlink() over CIFS
>
> Queued for default, thanks.
>
Perhaps this is worth the risk.
Let me just note that opening a file in exclusive mode possibly prevents
deletion of other hardlinks to this file for as long as the file is held open.
As per the comment in win32.unlink:
# - Calling os.unlink (or os.rename) on a file f fails if f or any
# hardlinked copy of f has been opened with Python's open(). There is no
# way such a file can be deleted or renamed on Windows (other than
# scheduling the delete or rename for the next reboot).
and:
http://mercurial.selenic.com/wiki/UnlinkingFilesOnWindows
More information about the Mercurial-devel
mailing list