Kiln » largefiles » Unity
Clone URL:  

python had list comprehensions - beautiful, beautiful list comprehensions. use them.

Changeset 0a2b4117dbb2

Parent 65a0bfb13411

by Profile picture of User 521Andrew Pritchard <andrewp@fogcreek.com>

Changes to one file · Browse files at 0a2b4117dbb2 Showing diff from parent 65a0bfb13411 Diff from another changeset...

Change 1 of 1 Show Entire File lfutil.py Stacked
 
227
228
229
230
231
232
233
234
235
236
237
 
 
 
238
239
240
 
227
228
229
 
 
 
 
 
 
 
 
230
231
232
233
234
235
@@ -227,14 +227,9 @@
  if matcher is None:   matcher = getstandinmatcher(repo)   - lfiles = [] - cctx = repo[rev] - for standin in cctx.walk(matcher): - filename = splitstandin(standin) - # ignore unknown files if we're walking the working directory - if rev is not None or repo.dirstate[standin] != '?': - lfiles.append(filename) - return lfiles + # ignore unknown files in working directory + return [splitstandin(f) for f in repo[rev].walk(matcher) \ + if rev is not None or repo.dirstate[f] != '?']    def incache(repo, hash):   return os.path.exists(cachepath(repo, hash))