comparison hgext/largefiles/reposetup.py @ 22525:764127f58903

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.
author Martin von Zweigbergk <martinvonz@gmail.com>
date Tue, 16 Sep 2014 23:10:39 -0700
parents 8c8fe120670f
children 509e2cbee679
comparison
equal deleted inserted replaced
22524:8c8fe120670f 22525:764127f58903
191 else: 191 else:
192 added.append(lfile) 192 added.append(lfile)
193 193
194 # Standins no longer found in lfdirstate has been 194 # Standins no longer found in lfdirstate has been
195 # removed 195 # removed
196 for standin in ctx1.manifest(): 196 for standin in ctx1.walk(lfutil.getstandinmatcher(self)):
197 if not lfutil.isstandin(standin):
198 continue
199 lfile = lfutil.splitstandin(standin) 197 lfile = lfutil.splitstandin(standin)
200 if not match(lfile): 198 if not match(lfile):
201 continue 199 continue
202 if lfile not in lfdirstate: 200 if lfile not in lfdirstate:
203 removed.append(lfile) 201 removed.append(lfile)