[PATCH 6 of 7] largefiles: replace hashrepofile by hashfile (API)
FUJIWARA Katsunori
foozy at lares.dti.ne.jp
Fri Mar 24 09:38:40 EDT 2017
# HG changeset patch
# User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
# Date 1490362162 -32400
# Fri Mar 24 22:29:22 2017 +0900
# Node ID b0176fef06b79d8e4364bf2befa2522635c4d3ff
# Parent d8e91cf37cc9409c79c5d97969c1e63d0dbe8908
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.
diff --git a/hgext/largefiles/lfutil.py b/hgext/largefiles/lfutil.py
--- a/hgext/largefiles/lfutil.py
+++ b/hgext/largefiles/lfutil.py
@@ -370,9 +370,6 @@ def copyandhash(instream, outfile):
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 ''
diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py
--- a/hgext/largefiles/overrides.py
+++ b/hgext/largefiles/overrides.py
@@ -1400,7 +1400,7 @@ def mergeupdate(orig, repo, node, branch
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))
More information about the Mercurial-devel
mailing list