mercurial/util.py
changeset 422 10c43444a38e
parent 421 43b8da7420a9
child 441 e8af362cfb01
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -18,7 +18,22 @@ def rename(src, dst):
 if os.name == 'nt':
     def pconvert(path):
         return path.replace("\\", "/")
+
+    def makelock(info, pathname):
+        ld = os.open(pathname, os.O_CREAT | os.O_WRONLY | os.O_EXCL)
+        os.write(ld, info)
+        os.close(ld)
+
+    def readlock(pathname):
+        return file(pathname).read()
 else:
     def pconvert(path):
         return path
 
+    def makelock(info, pathname):
+        os.symlink(info, pathname)
+
+    def readlock(pathname):
+        return os.readlink(pathname)
+
+