# HG changeset patch # User Martin von Zweigbergk # Date 2017-05-05 04:11:40 # Node ID e4a4ebfd9d8ee96412ee5909b1e4d97694fd55c2 # Parent c939fdce0fde77d4b1b03ba3402ee68f104be448 forget: access status fields by name, not index diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py --- a/mercurial/cmdutil.py +++ b/mercurial/cmdutil.py @@ -2309,7 +2309,7 @@ def forget(ui, repo, match, prefix, expl forgot = [] s = repo.status(match=matchmod.badmatch(match, badfn), clean=True) - forget = sorted(s[0] + s[1] + s[3] + s[6]) + forget = sorted(s.modified + s.added + s.deleted + s.clean) if explicitonly: forget = [f for f in forget if match.exact(f)]