# HG changeset patch # User Yuya Nishihara # Date 2018-03-03 15:32:06 # Node ID f6efb3c08c197f530efc4b204a51a08c2702bab5 # Parent 77f98867538fd96c98c6ec0ae0f3827d1f1aaaa7 py3: fix formatting of lock error message diff --git a/mercurial/lock.py b/mercurial/lock.py --- a/mercurial/lock.py +++ b/mercurial/lock.py @@ -50,10 +50,12 @@ def trylock(ui, vfs, lockname, timeout, # show more details for new-style locks if ':' in locker: host, pid = locker.split(":", 1) - msg = _("waiting for lock on %s held by process %r " - "on host %r\n") % (l.desc, pid, host) + msg = (_("waiting for lock on %s held by process %r on host %r\n") + % (pycompat.bytestr(l.desc), pycompat.bytestr(pid), + pycompat.bytestr(host))) else: - msg = _("waiting for lock on %s held by %r\n") % (l.desc, locker) + msg = (_("waiting for lock on %s held by %r\n") + % (l.desc, pycompat.bytestr(locker))) printer(msg) l = lock(vfs, lockname, 0, *args, dolock=False, **kwargs)