[PATCH 4 of 8] largefiles: remove confusing rev parameter for lfdirstatestatus
Mads Kiilerich
mads at kiilerich.com
Wed Oct 15 03:09:11 UTC 2014
# HG changeset patch
# User Mads Kiilerich <madski at unity3d.com>
# Date 1412289760 -7200
# Fri Oct 03 00:42:40 2014 +0200
# Node ID f25d82ea18cc11d29d316b5c1777e635b01472b4
# Parent 171c081e0a09f34fff89f30609267fc5ad9d8fe3
largefiles: remove confusing rev parameter for lfdirstatestatus
Dirstate only works on the repo wctx.
diff --git a/hgext/largefiles/lfutil.py b/hgext/largefiles/lfutil.py
--- a/hgext/largefiles/lfutil.py
+++ b/hgext/largefiles/lfutil.py
@@ -134,13 +134,14 @@ def openlfdirstate(ui, repo, create=True
lfdirstate.normallookup(lfile)
return lfdirstate
-def lfdirstatestatus(lfdirstate, repo, rev):
+def lfdirstatestatus(lfdirstate, repo):
+ wctx = repo['.']
match = match_.always(repo.root, repo.getcwd())
unsure, s = lfdirstate.status(match, [], False, False, False)
modified, clean = s.modified, s.clean
for lfile in unsure:
try:
- fctx = repo[rev][standin(lfile)]
+ fctx = wctx[standin(lfile)]
except LookupError:
fctx = None
if not fctx or fctx.data().strip() != hashfile(repo.wjoin(lfile)):
diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py
--- a/hgext/largefiles/overrides.py
+++ b/hgext/largefiles/overrides.py
@@ -660,7 +660,7 @@ def overriderevert(orig, ui, repo, *pats
wlock = repo.wlock()
try:
lfdirstate = lfutil.openlfdirstate(ui, repo)
- s = lfutil.lfdirstatestatus(lfdirstate, repo, repo['.'].rev())
+ s = lfutil.lfdirstatestatus(lfdirstate, repo)
lfdirstate.write()
for lfile in s.modified:
lfutil.updatestandin(repo, lfutil.standin(lfile))
More information about the Mercurial-devel
mailing list