diff hgext/chgserver.py @ 29341:0d83ad967bf8

cleanup: replace uses of util.(md5|sha1|sha256|sha512) with hashlib.\1 All versions of Python we support or hope to support make the hash functions available in the same way under the same name, so we may as well drop the util forwards.
author Augie Fackler <raf@durin42.com>
date Fri, 10 Jun 2016 00:12:33 -0400
parents 57a24a85a2bc
children 247ea0dfdb94
line wrap: on
line diff
--- a/hgext/chgserver.py	Fri Jun 10 00:25:07 2016 -0400
+++ b/hgext/chgserver.py	Fri Jun 10 00:12:33 2016 -0400
@@ -43,6 +43,7 @@
 import SocketServer
 import errno
 import gc
+import hashlib
 import inspect
 import os
 import random
@@ -76,7 +77,7 @@
 
 def _hashlist(items):
     """return sha1 hexdigest for a list"""
-    return util.sha1(str(items)).hexdigest()
+    return hashlib.sha1(str(items)).hexdigest()
 
 # sensitive config sections affecting confighash
 _configsections = [