--- 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)