Mercurial > hg
diff hgext/blackbox.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 | a6db1163befa |
children | 8113c88b8e6d |
line wrap: on
line diff
--- a/hgext/blackbox.py Mon Feb 08 00:47:36 2016 +0000 +++ b/hgext/blackbox.py Wed Feb 03 09:11:22 2016 +0000 @@ -31,7 +31,7 @@ from mercurial import util, cmdutil from mercurial.i18n import _ -import errno, os, re +import errno, re cmdtable = {} command = cmdutil.command(cmdtable) @@ -107,7 +107,7 @@ if blackbox: date = util.datestr(None, '%Y/%m/%d %H:%M:%S') user = util.getuser() - pid = str(os.getpid()) + pid = str(util.getpid()) formattedmsg = msg[0] % msg[1:] try: blackbox.write('%s %s (%s)> %s' %