hgext/remotefilelog/debugcommands.py
changeset 44062 2d49482d0dd4
parent 43554 9f70512ae2cf
child 46114 59fa3890d40a
--- a/hgext/remotefilelog/debugcommands.py	Mon Jan 13 17:16:54 2020 -0500
+++ b/hgext/remotefilelog/debugcommands.py	Mon Jan 13 14:12:31 2020 -0500
@@ -6,7 +6,6 @@
 # GNU General Public License version 2 or any later version.
 from __future__ import absolute_import
 
-import hashlib
 import os
 import zlib
 
@@ -21,6 +20,7 @@
     pycompat,
     revlog,
 )
+from mercurial.utils import hashutil
 from . import (
     constants,
     datapack,
@@ -61,7 +61,7 @@
 
 def buildtemprevlog(repo, file):
     # get filename key
-    filekey = nodemod.hex(hashlib.sha1(file).digest())
+    filekey = nodemod.hex(hashutil.sha1(file).digest())
     filedir = os.path.join(repo.path, b'store/data', filekey)
 
     # sort all entries based on linkrev
@@ -421,7 +421,7 @@
             % (
                 hashformatter(node),
                 hashformatter(deltabasenode),
-                nodemod.hex(hashlib.sha1(delta).digest()),
+                nodemod.hex(hashutil.sha1(delta).digest()),
                 len(delta),
             )
         )