# HG changeset patch # User Martin von Zweigbergk # Date 2014-09-17 06:10:39 # Node ID 764127f58903c2b0c044f8f20c83976e1259d61d # Parent 8c8fe120670f320c7f3a775ce54a48610149de65 largefiles: simplify iteration over standins Instead of iterating over all files in the context and ignoring those that are not standins, pass a standin-matcher to the context and iterate over only the files matching. Apart from making the intent clearer, this implementation will also benefit from any future optimizations done to the manifest walking code. diff --git a/hgext/largefiles/reposetup.py b/hgext/largefiles/reposetup.py --- a/hgext/largefiles/reposetup.py +++ b/hgext/largefiles/reposetup.py @@ -193,9 +193,7 @@ def reposetup(ui, repo): # Standins no longer found in lfdirstate has been # removed - for standin in ctx1.manifest(): - if not lfutil.isstandin(standin): - continue + for standin in ctx1.walk(lfutil.getstandinmatcher(self)): lfile = lfutil.splitstandin(standin) if not match(lfile): continue