diff mercurial/hg.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 92d37fb3f1aa
children 98e8313dcd9e
line wrap: on
line diff
--- a/mercurial/hg.py	Fri Jun 10 00:25:07 2016 -0400
+++ b/mercurial/hg.py	Fri Jun 10 00:12:33 2016 -0400
@@ -9,6 +9,7 @@
 from __future__ import absolute_import
 
 import errno
+import hashlib
 import os
 import shutil
 
@@ -480,7 +481,8 @@
                 ui.status(_('(not using pooled storage: '
                             'unable to resolve identity of remote)\n'))
         elif sharenamemode == 'remote':
-            sharepath = os.path.join(sharepool, util.sha1(source).hexdigest())
+            sharepath = os.path.join(
+                sharepool, hashlib.sha1(source).hexdigest())
         else:
             raise error.Abort('unknown share naming mode: %s' % sharenamemode)