##// END OF EJS Templates
add: replace match.bad() monkey patching with match.badmatch()...
Matt Harbison -
r25436:9724cbe2 default
parent child Browse files
Show More
@@ -2213,15 +2213,16 b' def graphrevs(repo, nodes, opts):'
2213 def add(ui, repo, match, prefix, explicitonly, **opts):
2213 def add(ui, repo, match, prefix, explicitonly, **opts):
2214 join = lambda f: os.path.join(prefix, f)
2214 join = lambda f: os.path.join(prefix, f)
2215 bad = []
2215 bad = []
2216 oldbad = match.bad
2216
2217 match.bad = lambda x, y: bad.append(x) or oldbad(x, y)
2217 badfn = lambda x, y: bad.append(x) or match.bad(x, y)
2218 names = []
2218 names = []
2219 wctx = repo[None]
2219 wctx = repo[None]
2220 cca = None
2220 cca = None
2221 abort, warn = scmutil.checkportabilityalert(ui)
2221 abort, warn = scmutil.checkportabilityalert(ui)
2222 if abort or warn:
2222 if abort or warn:
2223 cca = scmutil.casecollisionauditor(ui, abort, repo.dirstate)
2223 cca = scmutil.casecollisionauditor(ui, abort, repo.dirstate)
2224 for f in wctx.walk(match):
2224
2225 for f in wctx.walk(matchmod.badmatch(match, badfn)):
2225 exact = match.exact(f)
2226 exact = match.exact(f)
2226 if exact or not explicitonly and f not in wctx and repo.wvfs.lexists(f):
2227 if exact or not explicitonly and f not in wctx and repo.wvfs.lexists(f):
2227 if cca:
2228 if cca:
General Comments 0
You need to be logged in to leave comments. Login now