##// END OF EJS Templates
forget: replace match.bad() monkey patching with match.badmatch()...
Matt Harbison -
r25437:9c1bcd95 default
parent child Browse files
Show More
@@ -2251,11 +2251,11 b' def add(ui, repo, match, prefix, explici'
2251 def forget(ui, repo, match, prefix, explicitonly):
2251 def forget(ui, repo, match, prefix, explicitonly):
2252 join = lambda f: os.path.join(prefix, f)
2252 join = lambda f: os.path.join(prefix, f)
2253 bad = []
2253 bad = []
2254 oldbad = match.bad
2254 badfn = lambda x, y: bad.append(x) or match.bad(x, y)
2255 match.bad = lambda x, y: bad.append(x) or oldbad(x, y)
2256 wctx = repo[None]
2255 wctx = repo[None]
2257 forgot = []
2256 forgot = []
2258 s = repo.status(match=match, clean=True)
2257
2258 s = repo.status(match=matchmod.badmatch(match, badfn), clean=True)
2259 forget = sorted(s[0] + s[1] + s[3] + s[6])
2259 forget = sorted(s[0] + s[1] + s[3] + s[6])
2260 if explicitonly:
2260 if explicitonly:
2261 forget = [f for f in forget if match.exact(f)]
2261 forget = [f for f in forget if match.exact(f)]
General Comments 0
You need to be logged in to leave comments. Login now