diff hgext/largefiles/lfcommands.py @ 40675:9fcf8084ada8

py3: use node.hex(m.digest()) instead of m.hexdigest() hashlib.sha1.hexdigest() returns str on Python 3. Differential Revision: https://phab.mercurial-scm.org/D5287
author Pulkit Goyal <pulkit@yandex-team.ru>
date Mon, 19 Nov 2018 21:12:13 +0300
parents 7375a9ab0149
children 98681293c890
line wrap: on
line diff
--- a/hgext/largefiles/lfcommands.py	Sun Nov 18 02:40:47 2018 +0100
+++ b/hgext/largefiles/lfcommands.py	Mon Nov 19 21:12:13 2018 +0300
@@ -240,7 +240,7 @@
                 # largefile was modified, update standins
                 m = hashlib.sha1('')
                 m.update(ctx[f].data())
-                hash = m.hexdigest()
+                hash = node.hex(m.digest())
                 if f not in lfiletohash or lfiletohash[f] != hash:
                     rdst.wwrite(f, ctx[f].data(), ctx[f].flags())
                     executable = 'x' in ctx[f].flags()