mercurial/localrepo.py
changeset 29341 0d83ad967bf8
parent 29237 ee935a6e1ea2
child 29352 37c7f9fb7040
--- a/mercurial/localrepo.py	Fri Jun 10 00:25:07 2016 -0400
+++ b/mercurial/localrepo.py	Fri Jun 10 00:12:33 2016 -0400
@@ -8,6 +8,7 @@
 from __future__ import absolute_import
 
 import errno
+import hashlib
 import inspect
 import os
 import random
@@ -1013,7 +1014,7 @@
                 hint=_("run 'hg recover' to clean up transaction"))
 
         idbase = "%.40f#%f" % (random.random(), time.time())
-        txnid = 'TXN:' + util.sha1(idbase).hexdigest()
+        txnid = 'TXN:' + hashlib.sha1(idbase).hexdigest()
         self.hook('pretxnopen', throw=True, txnname=desc, txnid=txnid)
 
         self._writejournal(desc)