Mercurial > public > mercurial-scm > hg
comparison mercurial/util_win32.py @ 7778:82f7145b304c
Don't fail on clone on win98 (issue1492)
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 16 Feb 2009 17:37:23 -0600 |
parents | 5185a24ce04e |
children |
comparison
equal
deleted
inserted
replaced
7777:e3425726b80d | 7778:82f7145b304c |
---|---|
159 # Fake hardlinking error | 159 # Fake hardlinking error |
160 raise WinOSError((18, 'CreateHardLink', 'The system cannot ' | 160 raise WinOSError((18, 'CreateHardLink', 'The system cannot ' |
161 'move the file to a different disk drive')) | 161 'move the file to a different disk drive')) |
162 except pywintypes.error, details: | 162 except pywintypes.error, details: |
163 raise WinOSError(details) | 163 raise WinOSError(details) |
164 except NotImplementedError: # Another fake error win Win98 | |
165 raise WinOSError((18, 'CreateHardLink', 'Hardlinking not supported')) | |
164 | 166 |
165 def nlinks(pathname): | 167 def nlinks(pathname): |
166 """Return number of hardlinks for the given file.""" | 168 """Return number of hardlinks for the given file.""" |
167 try: | 169 try: |
168 fh = win32file.CreateFile(pathname, | 170 fh = win32file.CreateFile(pathname, |