Patchwork [06,of,17,V4] hgcia: 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 <f17a69e7af06df7cd9c5.1413092663@handduk2.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/6224/
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 1412355099 25200
#      Fri Oct 03 09:51:39 2014 -0700
# Node ID f17a69e7af06df7cd9c56eb51d0f9fef94db29e0
# Parent  853d838b996c74be6533003027c3a6e17eb52571
hgcia: access status fields by name rather than index

Patch

diff --git a/hgext/hgcia.py b/hgext/hgcia.py
--- a/hgext/hgcia.py
+++ b/hgext/hgcia.py
@@ -82,14 +82,14 @@ 
         if url and url[-1] == '/':
             url = url[:-1]
         elems = []
-        for path in f[0]:
+        for path in f.modified:
             uri = '%s/diff/%s/%s' % (url, short(n), path)
             elems.append(self.fileelem(path, url and uri, 'modify'))
-        for path in f[1]:
+        for path in f.added:
             # TODO: copy/rename ?
             uri = '%s/file/%s/%s' % (url, short(n), path)
             elems.append(self.fileelem(path, url and uri, 'add'))
-        for path in f[2]:
+        for path in f.removed:
             elems.append(self.fileelem(path, '', 'remove'))
 
         return '\n'.join(elems)