changeset 31617:1f6c932862e5

largefiles: replace hashrepofile by hashfile (API) There is only one user for the former, and repo.wjoin()-ed value is alread known by that user.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Fri, 24 Mar 2017 22:29:22 +0900
parents 10561eb97c7f
children 8228bc8fed8c
files hgext/largefiles/lfutil.py hgext/largefiles/overrides.py
diffstat 2 files changed, 1 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/largefiles/lfutil.py	Fri Mar 24 22:26:34 2017 +0900
+++ b/hgext/largefiles/lfutil.py	Fri Mar 24 22:29:22 2017 +0900
@@ -370,9 +370,6 @@
         outfile.write(data)
     return hasher.hexdigest()
 
-def hashrepofile(repo, file):
-    return hashfile(repo.wjoin(file))
-
 def hashfile(file):
     if not os.path.exists(file):
         return ''
--- a/hgext/largefiles/overrides.py	Fri Mar 24 22:26:34 2017 +0900
+++ b/hgext/largefiles/overrides.py	Fri Mar 24 22:29:22 2017 +0900
@@ -1400,7 +1400,7 @@
             lfileabs = repo.wvfs.join(lfile)
             if not repo.wvfs.exists(lfileabs):
                 continue
-            lfhash = lfutil.hashrepofile(repo, lfile)
+            lfhash = lfutil.hashfile(lfileabs)
             standin = lfutil.standin(lfile)
             lfutil.writestandin(repo, standin, lfhash,
                                 lfutil.getexecutable(lfileabs))