repoview: use util.sha1() instead of hashlib.sha1()
authorAugie Fackler <raf@durin42.com>
Wed, 20 Aug 2014 13:21:41 -0400
changeset 22261 eba48f2b9b74
parent 22260 2229d757802d
child 22262 10880c8aad85
repoview: use util.sha1() instead of hashlib.sha1() 45b5cd948a4d accidentally broke Python 2.4 compatibility, this fixes it.
mercurial/repoview.py
--- a/mercurial/repoview.py	Mon Aug 18 17:17:23 2014 -0700
+++ b/mercurial/repoview.py	Wed Aug 20 13:21:41 2014 -0400
@@ -8,7 +8,6 @@
 
 import copy
 import error
-import hashlib
 import phases
 import util
 import obsolete
@@ -69,8 +68,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 = hashlib.sha1()
-    h.update(''.join(repo.heads()))
+    h = util.sha1(''.join(repo.heads()))
     h.update(str(hash(frozenset(hideable))))
     return h.digest()