# HG changeset patch # User Matt Harbison # Date 2014-12-18 02:51:09 # Node ID 95f238cafb32b9a852d71585e666bb04369a4fa8 # Parent d3e137c91f94d4d9062a62945e90ff2396fea0b0 largefiles: ensure that the standin files are available in getlfilestoupload() The function only adds the hash content of the file to the set to upload if the file in the ctx is a standin. It is called by overrides.summaryremotehook(), which is called in the summary method. The largefiles extension switches 'lfstatus' on in summary, so the standins shouldn't be visible when obtaining a context there. The reason this wasn't noticed before is that the 'lfstatus' attribute is only being set on the unfiltered repo because of how repoview delegates attribute assignment. Therefore any filtered view will return a context containing standins, whether or not 'lfstatus' was set in the various overrides methods. That will be fixed in the next patch. But without this change, the next patch would have test failures for 'summary --large' stating there are no files to upload. diff --git a/hgext/largefiles/lfutil.py b/hgext/largefiles/lfutil.py --- a/hgext/largefiles/lfutil.py +++ b/hgext/largefiles/lfutil.py @@ -422,7 +422,14 @@ def getlfilestoupdate(oldstandins, newst def getlfilestoupload(repo, missing, addfunc): for n in missing: parents = [p for p in repo.changelog.parents(n) if p != node.nullid] - ctx = repo[n] + + oldlfstatus = repo.lfstatus + repo.lfstatus = False + try: + ctx = repo[n] + finally: + repo.lfstatus = oldlfstatus + files = set(ctx.files()) if len(parents) == 2: mc = ctx.manifest()