Patchwork [09,of,17,V4] purge: access status fields by name rather than index

login
register
mail settings
Submitter Martin von Zweigbergk
Date Oct. 12, 2014, 5:44 a.m.
Message ID <8641d1b281999d291fd0.1413092666@handduk2.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/6225/
State Accepted
Headers show

Comments

Martin von Zweigbergk - Oct. 12, 2014, 5:44 a.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@gmail.com>
# Date 1412357923 25200
#      Fri Oct 03 10:38:43 2014 -0700
# Node ID 8641d1b281999d291fd0ac4fbafe757907f7eb25
# Parent  582da2291ebac558dfd74bebec465caa90ac1625
purge: access status fields by name rather than index

Patch

diff --git a/hgext/purge.py b/hgext/purge.py
--- a/hgext/purge.py
+++ b/hgext/purge.py
@@ -102,7 +102,7 @@ 
     status = repo.status(match=match, ignored=opts['all'], unknown=True)
 
     if removefiles:
-        for f in sorted(status[4] + status[5]):
+        for f in sorted(status.unknown + status.ignored):
             if act:
                 ui.note(_('removing file %s\n') % f)
             remove(util.unlink, f)