comparison mercurial/scmutil.py @ 31358:719e64bf9ec2

scmutil: fix key generation to portably bytestringify integer
author Augie Fackler <augie@google.com>
date Sun, 12 Mar 2017 00:47:39 -0500
parents 1937671105bc
children 1fc3d1f02865
comparison
equal deleted inserted replaced
31357:fc06c5260639 31358:719e64bf9ec2
326 key = None 326 key = None
327 revs = sorted(r for r in cl.filteredrevs if r <= maxrev) 327 revs = sorted(r for r in cl.filteredrevs if r <= maxrev)
328 if revs: 328 if revs:
329 s = hashlib.sha1() 329 s = hashlib.sha1()
330 for rev in revs: 330 for rev in revs:
331 s.update('%s;' % rev) 331 s.update('%d;' % rev)
332 key = s.digest() 332 key = s.digest()
333 return key 333 return key
334 334
335 # compatibility layer since all 'vfs' code moved to 'mercurial.vfs' 335 # compatibility layer since all 'vfs' code moved to 'mercurial.vfs'
336 # 336 #