[PATCH 9 of 9 py3] scmutil: fix key generation to portably bytestringify integer

Augie Fackler raf at durin42.com
Sun Mar 12 13:22:18 EDT 2017


# HG changeset patch
# User Augie Fackler <augie at google.com>
# Date 1489297659 18000
#      Sun Mar 12 00:47:39 2017 -0500
# Node ID e2ea63c3cf93002bb5322be3ebcaa166c0300bed
# Parent  12fa9b8994f4fa746f11d97dd0bc697c5a1f860a
scmutil: fix key generation to portably bytestringify integer

diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -328,7 +328,7 @@ def filteredhash(repo, maxrev):
     if revs:
         s = hashlib.sha1()
         for rev in revs:
-            s.update('%s;' % rev)
+            s.update('%d;' % rev)
         key = s.digest()
     return key
 


More information about the Mercurial-devel mailing list