##// END OF EJS Templates
win32.py: add argtypes and restype...
win32.py: add argtypes and restype This is a feature of ctypes. Without these, pypy complains with RuntimeWarning: C function without declared arguments called RuntimeWarning: C function without declared return type called As a side effect of specifying restypes, the return value of e.g. CreateFileA is now implicitly converted to an instance of _HANDLE, so we also need to change the definition _INVALID_HANDLE_VALUE = -1 to _INVALID_HANDLE_VALUE = _HANDLE(-1).value Otherwise, tests for equality to _INVALID_HANDLE_VALUE in code like def _getfileinfo(name): fh = _kernel32.CreateFileA(name, 0, _FILE_SHARE_READ | _FILE_SHARE_WRITE | _FILE_SHARE_DELETE, None, _OPEN_EXISTING, 0, None) if fh == _INVALID_HANDLE_VALUE: _raiseoserror(name) would now fail to detect an invalid handle, which in turn would lead to exceptions raised with wrong errno values, like e.g. >>> nlinks('missing.txt') Traceback (most recent call last): ... OSError: [Errno 9] missing.txt: The handle is invalid. instead of the correct (as per this patch and before it) >>> nlinks('missing.txt') Traceback (most recent call last): ... OSError: [Errno 2] missing.txt: The system cannot find the file specified.
Adrian Buehlmann -
r14345:bf9a105a default
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.