--- a/mercurial/patch.py Fri Dec 29 05:22:06 2017 +0530
+++ b/mercurial/patch.py Fri Dec 29 05:25:27 2017 +0530
@@ -2654,7 +2654,7 @@
l = len(text)
s = hashlib.sha1('blob %d\0' % l)
s.update(text)
- return s.hexdigest()
+ return hex(s.digest())
if opts.noprefix:
aprefix = bprefix = ''