[PATCH] largefiles: remove unused lfutil.readhash()

Patrick Mezard pmezard at gmail.com
Wed Jan 18 08:26:02 CST 2012


# HG changeset patch
# User Patrick Mezard <pmezard at gmail.com>
# Date 1326893599 -3600
# Node ID 85483e6b1acaca0e586bab543f11a11512b5e005
# Parent  476a981fdf341f5bedbd958ca6c8e930fe35b5f9
largefiles: remove unused lfutil.readhash()

diff --git a/hgext/largefiles/lfutil.py b/hgext/largefiles/lfutil.py
--- a/hgext/largefiles/lfutil.py
+++ b/hgext/largefiles/lfutil.py
@@ -390,15 +390,6 @@
     # same blecch as copyandhash() above
     infile.close()
 
-def readhash(filename):
-    rfile = open(filename, 'rb')
-    hash = rfile.read(40)
-    rfile.close()
-    if len(hash) < 40:
-        raise util.Abort(_('bad hash in \'%s\' (only %d bytes long)')
-                         % (filename, len(hash)))
-    return hash
-
 def writehash(hash, filename, executable):
     util.makedirs(os.path.dirname(filename))
     util.writefile(filename, hash + '\n')


More information about the Mercurial-devel mailing list