Mercurial > public > mercurial-scm > hg
comparison mercurial/cmdutil.py @ 32174:e4a4ebfd9d8e
forget: access status fields by name, not index
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 04 May 2017 21:11:40 -0700 |
parents | 055cca8e167b |
children | 770bbfdc9644 |
comparison
equal
deleted
inserted
replaced
32173:c939fdce0fde | 32174:e4a4ebfd9d8e |
---|---|
2307 badfn = lambda x, y: bad.append(x) or match.bad(x, y) | 2307 badfn = lambda x, y: bad.append(x) or match.bad(x, y) |
2308 wctx = repo[None] | 2308 wctx = repo[None] |
2309 forgot = [] | 2309 forgot = [] |
2310 | 2310 |
2311 s = repo.status(match=matchmod.badmatch(match, badfn), clean=True) | 2311 s = repo.status(match=matchmod.badmatch(match, badfn), clean=True) |
2312 forget = sorted(s[0] + s[1] + s[3] + s[6]) | 2312 forget = sorted(s.modified + s.added + s.deleted + s.clean) |
2313 if explicitonly: | 2313 if explicitonly: |
2314 forget = [f for f in forget if match.exact(f)] | 2314 forget = [f for f in forget if match.exact(f)] |
2315 | 2315 |
2316 for subpath in sorted(wctx.substate): | 2316 for subpath in sorted(wctx.substate): |
2317 sub = wctx.sub(subpath) | 2317 sub = wctx.sub(subpath) |