comparison mercurial/chgserver.py @ 35582:72b91f905065

py3: use node.hex(h.digest()) instead of h.hexdigest() hashlib.sha1.hexdigest() returns str on Python 3. Differential Revision: https://phab.mercurial-scm.org/D1792
author Pulkit Goyal <7895pulkit@gmail.com>
date Fri, 29 Dec 2017 05:25:27 +0530
parents 6e6d0a5b88e6
children ffa3026d4196
comparison
equal deleted inserted replaced
35581:154754d1f137 35582:72b91f905065
53 from . import ( 53 from . import (
54 commandserver, 54 commandserver,
55 encoding, 55 encoding,
56 error, 56 error,
57 extensions, 57 extensions,
58 node,
58 pycompat, 59 pycompat,
59 util, 60 util,
60 ) 61 )
61 62
62 _log = commandserver.log 63 _log = commandserver.log
63 64
64 def _hashlist(items): 65 def _hashlist(items):
65 """return sha1 hexdigest for a list""" 66 """return sha1 hexdigest for a list"""
66 return hashlib.sha1(str(items)).hexdigest() 67 return node.hex(hashlib.sha1(str(items)).digest())
67 68
68 # sensitive config sections affecting confighash 69 # sensitive config sections affecting confighash
69 _configsections = [ 70 _configsections = [
70 'alias', # affects global state commands.table 71 'alias', # affects global state commands.table
71 'eol', # uses setconfig('eol', ...) 72 'eol', # uses setconfig('eol', ...)