[PATCH topic-ext] compat: mercurial dropped alias for hashlib.sha1

timeless timeless at fmr.im
Fri Jul 8 13:02:11 EDT 2016


# HG changeset patch
# User timeless at gmail.com
# Date 1467994195 0
#      Fri Jul 08 16:09:55 2016 +0000
# Node ID d2c12f6a4e0b56cf040057c88fa542696bf2a069
# Parent  c5d4e856ad0e971e055913269acc5a6a313d3c2e
compat: mercurial dropped alias for hashlib.sha1

diff -r c5d4e856ad0e -r d2c12f6a4e0b hgext3rd/topic/topicmap.py
--- a/hgext3rd/topic/topicmap.py	Wed May 11 16:22:52 2016 +0200
+++ b/hgext3rd/topic/topicmap.py	Fri Jul 08 16:09:55 2016 +0000
@@ -1,4 +1,5 @@
 import contextlib
+import hashlib
 
 from mercurial.node import hex, bin, nullid
 from mercurial import (
@@ -34,7 +35,7 @@
     key = nullid
     revs = sorted(revs)
     if revs:
-        s = util.sha1()
+        s = hashlib.sha1()
         for rev in revs:
             s.update('%s;' % rev)
         key = s.digest()


More information about the Mercurial-devel mailing list