changeset 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 c939fdce0fde
children 456b4a32d75f
files mercurial/cmdutil.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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)]