diff mercurial/util.py @ 13375:f1fa8f481c7c

port win32.py to using the Python ctypes library The pywin32 package is no longer needed. ctypes is now required for running Mercurial on Windows. ctypes is included in Python since version 2.5. For Python 2.4, ctypes is available as an extra installer package for Windows. Moved spawndetached() from windows.py to win32.py and fixed it, using ctypes as well. spawndetached was defunct with Python 2.6.6 because Python removed their undocumented subprocess.CreateProcess. This fixes 'hg serve -d' on Windows.
author Adrian Buehlmann <adrian@cadifra.com>
date Mon, 14 Feb 2011 11:12:26 +0100
parents 2dc7a2a96cfd
children 777cef34a890
line wrap: on
line diff
--- a/mercurial/util.py	Mon Feb 14 11:12:22 2011 +0100
+++ b/mercurial/util.py	Mon Feb 14 11:12:26 2011 +0100
@@ -554,16 +554,6 @@
         # want to add "foo/bar/baz" before checking if there's a "foo/.hg"
         self.auditeddir.update(prefixes)
 
-def nlinks(pathname):
-    """Return number of hardlinks for the given file."""
-    return os.lstat(pathname).st_nlink
-
-if hasattr(os, 'link'):
-    os_link = os.link
-else:
-    def os_link(src, dst):
-        raise OSError(0, _("Hardlinks not supported"))
-
 def lookup_reg(key, name=None, scope=None):
     return None