##// END OF EJS Templates
opener: check hardlink count reporting (issue1866)...
opener: check hardlink count reporting (issue1866) The Linux CIFS kernel driver (even in 2.6.36) suffers from a hardlink count blindness bug (lstat() returning 1 in st_nlink when it is expected to return >1), which causes repository corruption if Mercurial running on Linux pushes or commits to a hardlinked repository stored on a Windows share, if that share is mounted using the CIFS driver. This patch works around issue1866 and improves the workaround done in 50523b4407f6 to fix issue761, by teaching the opener to lazily execute a runtime check (new function checknlink) to see if the hardlink count reported by nlinks() can be trusted. Since nlinks() is also known to return varying count values (1 or >1) depending on whether the file is open or not and depending on what client and server software combination is being used for accessing and serving the Windows share, we deliberately open the file before calling nlinks() in order to have a stable precondition. Trying to depend on the precondition "file closed" would be fragile, as the file could have been opened very easily somewhere else in the program.
Adrian Buehlmann -
r12938:bf826c0b 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.