Mercurial > public > mercurial-scm > hg-stable
diff mercurial/localrepo.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 | b74270da5eee |
children | 2122ffa903ea |
line wrap: on
line diff
--- a/mercurial/localrepo.py Mon Jan 13 17:14:19 2020 -0500 +++ b/mercurial/localrepo.py Mon Jan 13 17:15:14 2020 -0500 @@ -8,7 +8,6 @@ from __future__ import absolute_import import errno -import hashlib import os import random import sys @@ -74,6 +73,7 @@ ) from .utils import ( + hashutil, procutil, stringutil, ) @@ -2007,7 +2007,7 @@ ) idbase = b"%.40f#%f" % (random.random(), time.time()) - ha = hex(hashlib.sha1(idbase).digest()) + ha = hex(hashutil.sha1(idbase).digest()) txnid = b'TXN:' + ha self.hook(b'pretxnopen', throw=True, txnname=desc, txnid=txnid)