hgext/remotefilelog/shallowutil.py
changeset 40612 3fa4183e7803
parent 40610 13d4ad8d7801
child 41140 92a5fb73b3d5
--- a/hgext/remotefilelog/shallowutil.py	Tue Nov 13 17:41:54 2018 +0300
+++ b/hgext/remotefilelog/shallowutil.py	Tue Nov 13 18:07:21 2018 +0300
@@ -17,6 +17,7 @@
 from mercurial.i18n import _
 from mercurial import (
     error,
+    node,
     pycompat,
     revlog,
     util,
@@ -35,11 +36,11 @@
     return constants.SHALLOWREPO_REQUIREMENT in repo.requirements
 
 def getcachekey(reponame, file, id):
-    pathhash = hashlib.sha1(file).hexdigest()
+    pathhash = node.hex(hashlib.sha1(file).digest())
     return os.path.join(reponame, pathhash[:2], pathhash[2:], id)
 
 def getlocalkey(file, id):
-    pathhash = hashlib.sha1(file).hexdigest()
+    pathhash = node.hex(hashlib.sha1(file).digest())
     return os.path.join(pathhash, id)
 
 def getcachepath(ui, allowempty=False):