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 |