largefiles: replace hashrepofile by hashfile (API)
authorFUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Fri, 24 Mar 2017 22:29:22 +0900
changeset 31617 1f6c932862e5
parent 31616 10561eb97c7f
child 31618 8228bc8fed8c
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.
hgext/largefiles/lfutil.py
hgext/largefiles/overrides.py
--- 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))