hgext/remotefilelog/shallowutil.py
changeset 44062 2d49482d0dd4
parent 43503 313e3a279828
child 46113 59fa3890d40a
--- a/hgext/remotefilelog/shallowutil.py	Mon Jan 13 17:16:54 2020 -0500
+++ b/hgext/remotefilelog/shallowutil.py	Mon Jan 13 14:12:31 2020 -0500
@@ -8,7 +8,6 @@
 
 import collections
 import errno
-import hashlib
 import os
 import stat
 import struct
@@ -24,6 +23,7 @@
     util,
 )
 from mercurial.utils import (
+    hashutil,
     storageutil,
     stringutil,
 )
@@ -39,12 +39,12 @@
 
 
 def getcachekey(reponame, file, id):
-    pathhash = node.hex(hashlib.sha1(file).digest())
+    pathhash = node.hex(hashutil.sha1(file).digest())
     return os.path.join(reponame, pathhash[:2], pathhash[2:], id)
 
 
 def getlocalkey(file, id):
-    pathhash = node.hex(hashlib.sha1(file).digest())
+    pathhash = node.hex(hashutil.sha1(file).digest())
     return os.path.join(pathhash, id)