##// END OF EJS Templates
grep: speed up `hg grep --all-files some/path` by using ctx.matches(match)...
Martin von Zweigbergk -
r44501:6cfaebb6 default
parent child Browse files
Show More
@@ -2429,12 +2429,16 b' def walkchangerevs(repo, match, opts, pr'
2429 2429
2430 2430 def fns_generator():
2431 2431 if allfiles:
2432 fiter = iter(ctx)
2432
2433 def bad(f, msg):
2434 pass
2435
2436 for f in ctx.matches(matchmod.badmatch(match, bad)):
2437 yield f
2433 2438 else:
2434 fiter = ctx.files()
2435 for f in fiter:
2436 if match(f):
2437 yield f
2439 for f in ctx.files():
2440 if match(f):
2441 yield f
2438 2442
2439 2443 fns = fns_generator()
2440 2444 prepare(ctx, fns)
General Comments 0
You need to be logged in to leave comments. Login now