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