mercurial/lock.py
changeset 37123 a8a902d7176e
parent 36724 d77c3b023393
child 37658 34758397ad1b
--- a/mercurial/lock.py	Sat Mar 24 15:09:33 2018 +0900
+++ b/mercurial/lock.py	Sat Mar 24 15:10:51 2018 +0900
@@ -21,7 +21,10 @@
     encoding,
     error,
     pycompat,
-    util,
+)
+
+from .utils import (
+    procutil,
 )
 
 def _getlockprefix():
@@ -212,8 +215,8 @@
         self.release()
 
     def _getpid(self):
-        # wrapper around util.getpid() to make testing easier
-        return util.getpid()
+        # wrapper around procutil.getpid() to make testing easier
+        return procutil.getpid()
 
     def lock(self):
         timeout = self.timeout
@@ -299,7 +302,7 @@
             pid = int(pid)
         except ValueError:
             return locker
-        if util.testpid(pid):
+        if procutil.testpid(pid):
             return locker
         # if locker dead, break lock.  must do this with another lock
         # held, or can race and break valid lock.