Mercurial > public > mercurial-scm > hg-stable
diff mercurial/lock.py @ 37123:a8a902d7176e
procutil: bulk-replace function calls to point to new module
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 24 Mar 2018 15:10:51 +0900 |
parents | d77c3b023393 |
children | 34758397ad1b |
line wrap: on
line diff
--- 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.