--- a/contrib/shrink-revlog.py Fri May 06 15:31:09 2011 +0200
+++ b/contrib/shrink-revlog.py Fri May 06 15:34:34 2011 +0200
@@ -251,8 +251,8 @@
if not opts.get('dry_run'):
# racy, both files cannot be renamed atomically
# copy files
- util.os_link(indexfn, oldindexfn)
- ignoremissing(util.os_link)(datafn, olddatafn)
+ util.oslink(indexfn, oldindexfn)
+ ignoremissing(util.oslink)(datafn, olddatafn)
# rename
util.rename(tmpindexfn, indexfn)
--- a/hgext/relink.py Fri May 06 15:31:09 2011 +0200
+++ b/hgext/relink.py Fri May 06 15:34:34 2011 +0200
@@ -132,7 +132,7 @@
bak = dst + '.bak'
os.rename(dst, bak)
try:
- util.os_link(src, dst)
+ util.oslink(src, dst)
except OSError:
os.rename(bak, dst)
raise
--- a/mercurial/posix.py Fri May 06 15:31:09 2011 +0200
+++ b/mercurial/posix.py Fri May 06 15:34:34 2011 +0200
@@ -12,7 +12,7 @@
nulldev = '/dev/null'
normpath = os.path.normpath
samestat = os.path.samestat
-os_link = os.link
+oslink = os.link
unlink = os.unlink
rename = os.rename
expandglobs = False
--- a/mercurial/util.py Fri May 06 15:31:09 2011 +0200
+++ b/mercurial/util.py Fri May 06 15:34:34 2011 +0200
@@ -435,7 +435,7 @@
else:
if hardlink:
try:
- os_link(src, dst)
+ oslink(src, dst)
except (IOError, OSError):
hardlink = False
shutil.copy(src, dst)
@@ -624,7 +624,7 @@
fd = None
try:
try:
- os_link(f1, f2)
+ oslink(f1, f2)
except OSError:
return False
--- a/mercurial/win32.py Fri May 06 15:31:09 2011 +0200
+++ b/mercurial/win32.py Fri May 06 15:34:34 2011 +0200
@@ -140,7 +140,7 @@
finally:
_kernel32.CloseHandle(fh)
-def os_link(src, dst):
+def oslink(src, dst):
try:
if not _kernel32.CreateHardLinkA(dst, src, None):
_raiseoserror(src)