Mercurial > hg
diff mercurial/wireproto.py @ 29341:0d83ad967bf8
cleanup: replace uses of util.(md5|sha1|sha256|sha512) with hashlib.\1
All versions of Python we support or hope to support make the hash
functions available in the same way under the same name, so we may as
well drop the util forwards.
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Fri, 10 Jun 2016 00:12:33 -0400 |
parents | ead25aa27a43 |
children | 84c1a5942f1d |
line wrap: on
line diff
--- a/mercurial/wireproto.py Fri Jun 10 00:25:07 2016 -0400 +++ b/mercurial/wireproto.py Fri Jun 10 00:12:33 2016 -0400 @@ -7,6 +7,7 @@ from __future__ import absolute_import +import hashlib import itertools import os import sys @@ -410,7 +411,7 @@ if heads != ['force'] and self.capable('unbundlehash'): heads = encodelist(['hashed', - util.sha1(''.join(sorted(heads))).digest()]) + hashlib.sha1(''.join(sorted(heads))).digest()]) else: heads = encodelist(heads)