From patchwork Sat Mar 3 17:12:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [4,of,5] py3: fix formatting of lock error message From: Yuya Nishihara X-Patchwork-Id: 28793 Message-Id: To: mercurial-devel@mercurial-scm.org Date: Sat, 03 Mar 2018 12:12:32 -0500 # HG changeset patch # User Yuya Nishihara # Date 1520091126 18000 # Sat Mar 03 10:32:06 2018 -0500 # Node ID f9c0c67072248a5f88ffc0baa33fa0c0f31d43ef # Parent eb6c1453a714d61c7101a3c0f360cb8f661d827c 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)