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

login
register
mail settings
Submitter Augie Fackler
Date March 12, 2017, 5:59 p.m.
Message ID <c245d472dcbee3f874c9.1489341557@augie-macbookair2.roam.corp.google.com>
Download mbox | patch
Permalink /patch/19197/
State Accepted
Headers show

Comments

Augie Fackler - March 12, 2017, 5:59 p.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1489297659 18000
#      Sun Mar 12 00:47:39 2017 -0500
# Node ID c245d472dcbee3f874c94e16d8544ada93964351
# Parent  fb7154195406381920737671ff2402d910bb5546
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