[PATCH 05 of 10 py3] lock: use %d to format integer into a bytestring

Augie Fackler raf at durin42.com
Sun Mar 12 14:57:45 EDT 2017


# HG changeset patch
# User Augie Fackler <augie at google.com>
# Date 1489303744 14400
#      Sun Mar 12 03:29:04 2017 -0400
# Node ID 666d6b8778093c73611aa728f92c688a75994ed6
# Parent  74e974791be1479b80c6fd42923d999b9c2891a2
lock: use %d to format integer into a bytestring

diff --git a/mercurial/lock.py b/mercurial/lock.py
--- a/mercurial/lock.py
+++ b/mercurial/lock.py
@@ -118,7 +118,7 @@ class lock(object):
             return
         if lock._host is None:
             lock._host = _getlockprefix()
-        lockname = '%s:%s' % (lock._host, self.pid)
+        lockname = '%s:%d' % (lock._host, self.pid)
         retry = 5
         while not self.held and retry:
             retry -= 1


More information about the Mercurial-devel mailing list