--- 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)
+
+