mercurial/lock.py
changeset 36671 f6efb3c08c19
parent 36669 c77c925987d7
child 36686 214f61abd865
equal deleted inserted replaced
36670:77f98867538f 36671: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