forget: access status fields by name, not index
authorMartin von Zweigbergk <martinvonz@google.com>
Thu, 04 May 2017 21:11:40 -0700
changeset 32174 e4a4ebfd9d8e
parent 32173 c939fdce0fde
child 32175 456b4a32d75f
forget: access status fields by name, not index
mercurial/cmdutil.py
--- a/mercurial/cmdutil.py	Wed May 03 18:26:57 2017 -0700
+++ b/mercurial/cmdutil.py	Thu May 04 21:11:40 2017 -0700
@@ -2309,7 +2309,7 @@
     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)]