diff mercurial/repoview.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 a4dc5fe7bf54
children 20027be9f23d
line wrap: on
line diff
--- a/mercurial/repoview.py	Fri Jun 10 00:25:07 2016 -0400
+++ b/mercurial/repoview.py	Fri Jun 10 00:12:33 2016 -0400
@@ -9,6 +9,7 @@
 from __future__ import absolute_import
 
 import copy
+import hashlib
 import heapq
 import struct
 
@@ -18,7 +19,6 @@
     obsolete,
     phases,
     tags as tagsmod,
-    util,
 )
 
 def hideablerevs(repo):
@@ -102,7 +102,7 @@
     it to the cache. Upon reading we can easily validate by checking the hash
     against the stored one and discard the cache in case the hashes don't match.
     """
-    h = util.sha1()
+    h = hashlib.sha1()
     h.update(''.join(repo.heads()))
     h.update(str(hash(frozenset(hideable))))
     return h.digest()