diff hgext/largefiles/lfcommands.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 5ec25534ef4f
children 85868ecf2c0d
line wrap: on
line diff
--- a/hgext/largefiles/lfcommands.py	Fri Jun 10 00:25:07 2016 -0400
+++ b/hgext/largefiles/lfcommands.py	Fri Jun 10 00:12:33 2016 -0400
@@ -10,6 +10,7 @@
 from __future__ import absolute_import
 
 import errno
+import hashlib
 import os
 import shutil
 
@@ -229,7 +230,7 @@
                         raise error.Abort(_('largefile %s becomes symlink') % f)
 
                 # largefile was modified, update standins
-                m = util.sha1('')
+                m = hashlib.sha1('')
                 m.update(ctx[f].data())
                 hash = m.hexdigest()
                 if f not in lfiletohash or lfiletohash[f] != hash: