Submitter | Augie Fackler |
---|---|
Date | March 12, 2017, 7:49 p.m. |
Message ID | <600b4b0de4f01e4cdafb.1489348198@augie-macbookair2.roam.corp.google.com> |
Download | mbox | patch |
Permalink | /patch/19225/ |
State | Accepted |
Headers | show |
Comments
Patch
diff --git a/mercurial/lock.py b/mercurial/lock.py --- a/mercurial/lock.py +++ b/mercurial/lock.py @@ -15,6 +15,7 @@ import time import warnings from . import ( + encoding, error, pycompat, util, @@ -27,7 +28,7 @@ def _getlockprefix(): confidence. Typically it's just hostname. On modern linux, we include an extra Linux-specific pid namespace identifier. """ - result = socket.gethostname() + result = socket.gethostname().encode(encoding.encoding, 'replace') if pycompat.sysplatform.startswith('linux'): try: result += '/%x' % os.stat('/proc/self/ns/pid').st_ino