equal
deleted
inserted
replaced
2249 return bad |
2249 return bad |
2250 |
2250 |
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)] |
2262 |
2262 |
2263 for subpath in sorted(wctx.substate): |
2263 for subpath in sorted(wctx.substate): |