[PATCH 2 of 4] largefiles: fix commit of specified file on non-windows

Na'Tosha Bard natosha at unity3d.com
Thu Oct 6 04:22:56 CDT 2011


# HG changeset patch
# User Na'Tosha Bard <natosha at unity3d.com>
# Date 1317892206 -7200
# Node ID eef33f93426cbeb3869fbfc9b5ec0ec0f6ffd0d0
# Parent  098d34125c905d264029c80b962d3f3d96f079e0
largefiles: fix commit of specified file on non-windows

diff -r 098d34125c90 -r eef33f93426c hgext/largefiles/lfutil.py
--- a/hgext/largefiles/lfutil.py	Wed Oct 05 17:51:49 2011 +0200
+++ b/hgext/largefiles/lfutil.py	Thu Oct 06 11:10:06 2011 +0200
@@ -101,13 +101,9 @@
 
 # -- Private worker functions ------------------------------------------
 
-if os.name == 'nt':
-    from mercurial import win32
-    linkfn = win32.oslink
-
 def link(src, dest):
     try:
-        linkfn(src, dest)
+        util.oslink(src, dest)
     except OSError:
         # If hardlinks fail fall back on copy
         shutil.copyfile(src, dest)


More information about the Mercurial-devel mailing list