changeset 13976 | 9ca1ff3d4f8c |
parent 13795 | 43b5fe18ea6c |
child 14230 | d51630301241 |
--- a/mercurial/win32.py Thu Apr 21 16:06:19 2011 +0200 +++ b/mercurial/win32.py Thu Apr 21 15:08:48 2011 -0500 @@ -141,7 +141,10 @@ _kernel32.CloseHandle(fh) def os_link(src, dst): - if not _kernel32.CreateHardLinkA(dst, src, None): + try: + if not _kernel32.CreateHardLinkA(dst, src, None): + _raiseoserror(src) + except AttributeError: # Wine doesn't support this function _raiseoserror(src) def nlinks(name):