Mercurial > public > mercurial-scm > hg-stable
diff hgext/blackbox.py @ 18787:f56278a0a0c5
blackbox: use util.getuser for portability
On Windows, our implementation is more robust than Python's version.
author | Bryan O'Sullivan <bryano@fb.com> |
---|---|
date | Wed, 20 Mar 2013 13:40:06 -0700 |
parents | ed39a8f94e95 |
children | ac0336471ba7 |
line wrap: on
line diff
--- a/hgext/blackbox.py Wed Mar 20 13:40:05 2013 -0700 +++ b/hgext/blackbox.py Wed Mar 20 13:40:06 2013 -0700 @@ -25,7 +25,7 @@ from mercurial import util, cmdutil from mercurial.i18n import _ -import os, getpass, re +import os, re cmdtable = {} command = cmdutil.command(cmdtable) @@ -55,7 +55,7 @@ if blackbox: date = util.datestr(None, '%Y/%m/%d %H:%M:%S') - user = getpass.getuser() + user = util.getuser() formattedmsg = msg[0] % msg[1:] try: blackbox.write('%s %s> %s' % (date, user, formattedmsg))