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

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

Comments

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