Mercurial > hg
comparison mercurial/lock.py @ 36642:f6efb3c08c19
py3: fix formatting of lock error message
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 03 Mar 2018 10:32:06 -0500 |
parents | c77c925987d7 |
children | 214f61abd865 |
comparison
equal
deleted
inserted
replaced
36641:77f98867538f | 36642:f6efb3c08c19 |
---|---|
48 def printwarning(printer, locker): | 48 def printwarning(printer, locker): |
49 """issue the usual "waiting on lock" message through any channel""" | 49 """issue the usual "waiting on lock" message through any channel""" |
50 # show more details for new-style locks | 50 # show more details for new-style locks |
51 if ':' in locker: | 51 if ':' in locker: |
52 host, pid = locker.split(":", 1) | 52 host, pid = locker.split(":", 1) |
53 msg = _("waiting for lock on %s held by process %r " | 53 msg = (_("waiting for lock on %s held by process %r on host %r\n") |
54 "on host %r\n") % (l.desc, pid, host) | 54 % (pycompat.bytestr(l.desc), pycompat.bytestr(pid), |
55 pycompat.bytestr(host))) | |
55 else: | 56 else: |
56 msg = _("waiting for lock on %s held by %r\n") % (l.desc, locker) | 57 msg = (_("waiting for lock on %s held by %r\n") |
58 % (l.desc, pycompat.bytestr(locker))) | |
57 printer(msg) | 59 printer(msg) |
58 | 60 |
59 l = lock(vfs, lockname, 0, *args, dolock=False, **kwargs) | 61 l = lock(vfs, lockname, 0, *args, dolock=False, **kwargs) |
60 | 62 |
61 debugidx = 0 if (warntimeout and timeout) else -1 | 63 debugidx = 0 if (warntimeout and timeout) else -1 |