##// END OF EJS Templates
cat: replace match.bad() monkey patching with match.badmatch()...
Matt Harbison -
r25438:7ce5a323 default
parent child Browse files
Show More
@@ -2437,22 +2437,16 b' def cat(ui, repo, ctx, matcher, prefix, '
2437 return 0
2437 return 0
2438
2438
2439 # Don't warn about "missing" files that are really in subrepos
2439 # Don't warn about "missing" files that are really in subrepos
2440 bad = matcher.bad
2441
2442 def badfn(path, msg):
2440 def badfn(path, msg):
2443 for subpath in ctx.substate:
2441 for subpath in ctx.substate:
2444 if path.startswith(subpath):
2442 if path.startswith(subpath):
2445 return
2443 return
2446 bad(path, msg)
2444 matcher.bad(path, msg)
2447
2445
2448 matcher.bad = badfn
2446 for abs in ctx.walk(matchmod.badmatch(matcher, badfn)):
2449
2450 for abs in ctx.walk(matcher):
2451 write(abs)
2447 write(abs)
2452 err = 0
2448 err = 0
2453
2449
2454 matcher.bad = bad
2455
2456 for subpath in sorted(ctx.substate):
2450 for subpath in sorted(ctx.substate):
2457 sub = ctx.sub(subpath)
2451 sub = ctx.sub(subpath)
2458 try:
2452 try:
General Comments 0
You need to be logged in to leave comments. Login now