D588: win32: use fewer system calls for unlink()
indygreg (Gregory Szorc)
phabricator at mercurial-scm.org
Sat Sep 2 12:38:05 EDT 2017
indygreg added a comment.
OK. I failed to grok the unlink semantics on Windows. I'll need to read up on MSDN.
Would it be safe to keep the ``os.stat()`` code and return if the file doesn't exist? That at least allows us to do the "is directory" and "file missing" check with a single system call. That will avoid the random number generation and the 2nd system call for the rename when the file doesn't exist.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D588
To: indygreg, #hg-reviewers, quark
Cc: abuehl, durin42, quark, mercurial-devel
More information about the Mercurial-devel
mailing list