subrepo: remove "_calcfilehash" referred by no other code paths
authorFUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Wed, 19 Nov 2014 18:35:14 +0900
changeset 23366 568ae89797c6
parent 23365 2ff394bbfa74
child 23367 115af8de76a4
subrepo: remove "_calcfilehash" referred by no other code paths
mercurial/subrepo.py
--- a/mercurial/subrepo.py	Wed Nov 19 18:35:14 2014 +0900
+++ b/mercurial/subrepo.py	Wed Nov 19 18:35:14 2014 +0900
@@ -32,16 +32,6 @@
     '''get a unique filename for the store hash cache of a remote repository'''
     return util.sha1(_expandedabspath(remotepath)).hexdigest()[0:12]
 
-def _calcfilehash(filename):
-    data = ''
-    if os.path.exists(filename):
-        fd = open(filename, 'rb')
-        try:
-            data = fd.read()
-        finally:
-            fd.close()
-    return util.sha1(data).hexdigest()
-
 class SubrepoAbort(error.Abort):
     """Exception class used to avoid handling a subrepo error more than once"""
     def __init__(self, *args, **kw):