##// END OF EJS Templates
windows.rename: eliminate temp name race (issue2571)...
windows.rename: eliminate temp name race (issue2571) On Windows, os.rename reliably raises OSError with errno.EEXIST if the destination already exists (even on shares served by Samba). Windows does *not* silently overwrite the destination of a rename. So there is no need to first call os.path.exists on the chosen temp path. Trusting os.path.exists is actually harmful, since using it enables the following racy sequence of actions: 1) os.path.exists(temp) returns False 2) some evil other process creates a file with name temp 3) os.rename(dst, temp) now fails because temp has been taken Not using os.path.exists and directly trying os.rename(dst, temp) eliminates this race.
Adrian Buehlmann -
r13206:650314ed stable
Show More
Name Size Modified Last Commit Author
contrib
doc
hgext
i18n
mercurial
tests
.hgignore Loading ...
.hgsigs Loading ...
.hgtags Loading ...
CONTRIBUTORS Loading ...
COPYING Loading ...
Makefile Loading ...
README Loading ...
hg Loading ...
hgeditor Loading ...
hgweb.cgi Loading ...
setup.py Loading ...

Mercurial
=========

Mercurial is a fast, easy to use, distributed revision control tool
for software developers.

Basic install:

$ make # see install targets
$ make install # do a system-wide install
$ hg debuginstall # sanity-check setup
$ hg # see help

See http://mercurial.selenic.com/ for detailed installation
instructions, platform-specific notes, and Mercurial user information.