changeset 1713:00612a019547

evolve: use hashlib to compute sha1 hashes The util alias for sha1 was dropped in c27dc3c3122 in favor of hashlib.
author Jeroen Vaelen <jeroen@fb.com>
date Wed, 15 Jun 2016 15:19:38 -0700
parents a4de197218cf
children 4565b046b850
files hgext/evolve.py hgext/simple4server.py
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/evolve.py	Fri May 27 17:36:07 2016 +0200
+++ b/hgext/evolve.py	Wed Jun 15 15:19:38 2016 -0700
@@ -71,6 +71,7 @@
 import collections
 import socket
 import errno
+import hashlib
 import struct
 sha1re = re.compile(r'\b[0-9a-f]{6,40}\b')
 
@@ -3859,7 +3860,7 @@
     for i in unfi:
         ctx = unfi[i]
         entry = 0
-        sha = util.sha1()
+        sha = hashlib.sha1()
         # add data from p1
         for p in ctx.parents():
             p = p.rev()
--- a/hgext/simple4server.py	Fri May 27 17:36:07 2016 +0200
+++ b/hgext/simple4server.py	Wed Jun 15 15:19:38 2016 -0700
@@ -13,6 +13,7 @@
 
 import mercurial.obsolete
 
+import hashlib
 import struct
 from mercurial import util
 from mercurial import wireproto
@@ -192,7 +193,7 @@
     for i in unfi:
         ctx = unfi[i]
         entry = 0
-        sha = util.sha1()
+        sha = hashlib.sha1()
         # add data from p1
         for p in ctx.parents():
             p = p.rev()