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

login
register
mail settings
Submitter Augie Fackler
Date March 12, 2017, 5:22 p.m.
Message ID <e2ea63c3cf93002bb532.1489339338@augie-macbookair2.roam.corp.google.com>
Download mbox | patch
Permalink /patch/19177/
State Superseded
Headers show

Comments

Augie Fackler - March 12, 2017, 5:22 p.m.
# HG changeset patch
# User Augie Fackler <augie@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

Patch

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