Mercurial > public > mercurial-scm > hg-stable
diff mercurial/lock.py @ 28027:14033c5dd261
util: enable getpid to be replaced
This will enable tests to write stable process ids.
author | timeless <timeless@mozdev.org> |
---|---|
date | Wed, 03 Feb 2016 09:11:22 +0000 |
parents | 054abf2377e8 |
children | 518c3e392f75 |
line wrap: on
line diff
--- a/mercurial/lock.py Mon Feb 08 00:47:36 2016 +0000 +++ b/mercurial/lock.py Wed Feb 03 09:11:22 2016 +0000 @@ -9,7 +9,6 @@ import contextlib import errno -import os import socket import time import warnings @@ -77,8 +76,8 @@ self.release() def _getpid(self): - # wrapper around os.getpid() to make testing easier - return os.getpid() + # wrapper around util.getpid() to make testing easier + return util.getpid() def lock(self): timeout = self.timeout