Mercurial > public > mercurial-scm > hg-stable
diff mercurial/obsolete.py @ 44060:a61287a95dc3
core: migrate uses of hashlib.sha1 to hashutil.sha1
Differential Revision: https://phab.mercurial-scm.org/D7849
author | Augie Fackler <augie@google.com> |
---|---|
date | Mon, 13 Jan 2020 17:15:14 -0500 |
parents | 1542773ffa5d |
children | 9d2b2df2c2ba |
line wrap: on
line diff
--- a/mercurial/obsolete.py Mon Jan 13 17:14:19 2020 -0500 +++ b/mercurial/obsolete.py Mon Jan 13 17:15:14 2020 -0500 @@ -70,7 +70,6 @@ from __future__ import absolute_import import errno -import hashlib import struct from .i18n import _ @@ -85,7 +84,10 @@ pycompat, util, ) -from .utils import dateutil +from .utils import ( + dateutil, + hashutil, +) parsers = policy.importmod('parsers') @@ -1028,7 +1030,7 @@ def makefoldid(relation, user): - folddigest = hashlib.sha1(user) + folddigest = hashutil.sha1(user) for p in relation[0] + relation[1]: folddigest.update(b'%d' % p.rev()) folddigest.update(p.node())