mercurial/localrepo.py
changeset 29883 0c8c388c7d62
parent 29826 93b44aa17691
child 29918 d9c49138ab93
--- a/mercurial/localrepo.py	Mon Aug 29 00:00:05 2016 +0900
+++ b/mercurial/localrepo.py	Tue Aug 30 09:25:00 2016 -0700
@@ -1290,8 +1290,15 @@
         except error.LockHeld as inst:
             if not wait:
                 raise
-            self.ui.warn(_("waiting for lock on %s held by %r\n") %
-                         (desc, inst.locker))
+            # show more details for new-style locks
+            if ':' in inst.locker:
+                host, pid = inst.locker.split(":", 1)
+                self.ui.warn(
+                    _("waiting for lock on %s held by process %r "
+                      "on host %r\n") % (desc, pid, host))
+            else:
+                self.ui.warn(_("waiting for lock on %s held by %r\n") %
+                             (desc, inst.locker))
             # default to 600 seconds timeout
             l = lockmod.lock(vfs, lockname,
                              int(self.ui.config("ui", "timeout", "600")),