Mercurial > public > mercurial-scm > hg-stable
diff 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 |
line wrap: on
line diff
--- a/mercurial/chgserver.py Fri Dec 29 05:22:06 2017 +0530 +++ b/mercurial/chgserver.py Fri Dec 29 05:25:27 2017 +0530 @@ -55,6 +55,7 @@ encoding, error, extensions, + node, pycompat, util, ) @@ -63,7 +64,7 @@ def _hashlist(items): """return sha1 hexdigest for a list""" - return hashlib.sha1(str(items)).hexdigest() + return node.hex(hashlib.sha1(str(items)).digest()) # sensitive config sections affecting confighash _configsections = [