Mercurial > public > mercurial-scm > hg-stable
diff mercurial/repair.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 | 29adf0a087a1 |
children | 9d2b2df2c2ba |
line wrap: on
line diff
--- a/mercurial/repair.py Mon Jan 13 17:14:19 2020 -0500 +++ b/mercurial/repair.py Mon Jan 13 17:15:14 2020 -0500 @@ -9,7 +9,6 @@ from __future__ import absolute_import import errno -import hashlib from .i18n import _ from .node import ( @@ -29,7 +28,10 @@ pycompat, util, ) -from .utils import stringutil +from .utils import ( + hashutil, + stringutil, +) def backupbundle( @@ -45,7 +47,7 @@ # Include a hash of all the nodes in the filename for uniqueness allcommits = repo.set(b'%ln::%ln', bases, heads) allhashes = sorted(c.hex() for c in allcommits) - totalhash = hashlib.sha1(b''.join(allhashes)).digest() + totalhash = hashutil.sha1(b''.join(allhashes)).digest() name = b"%s/%s-%s-%s.hg" % ( backupdir, short(node),