mercurial/lock.py
changeset 422 10c43444a38e
parent 161 0b4c5cb953d9
child 429 688d03d6997a
--- a/mercurial/lock.py	Tue Jun 21 19:36:35 2005 -0800
+++ b/mercurial/lock.py	Tue Jun 21 19:43:40 2005 -0800
@@ -6,6 +6,7 @@
 # of the GNU General Public License, incorporated herein by reference.
 
 import os, time
+import util
 
 class LockHeld(Exception):
     pass
@@ -34,10 +35,10 @@
     def trylock(self):
         pid = os.getpid()
         try:
-            os.symlink(str(pid), self.f)
+            util.makelock(str(pid), self.f)
             self.held = 1
         except:
-            raise LockHeld(os.readlink(self.f))
+            raise LockHeld(util.readlock(self.f))
 
     def release(self):
         if self.held: