changeset 36671:f6efb3c08c19

py3: fix formatting of lock error message
author Yuya Nishihara <yuya@tcha.org>
date Sat, 03 Mar 2018 10:32:06 -0500
parents 77f98867538f
children 1e1c1bfb0be4
files mercurial/lock.py
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/lock.py	Sat Mar 03 10:02:36 2018 -0500
+++ b/mercurial/lock.py	Sat Mar 03 10:32:06 2018 -0500
@@ -50,10 +50,12 @@
         # 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)