Patchwork [05,of,15,v2] hgcia: access status fields by name rather than index

login
register
mail settings
Submitter Martin von Zweigbergk
Date Oct. 5, 2014, 6:08 a.m.
Message ID <a92d006e3263548ab0ce.1412489282@handduk2.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/6130/
State Superseded
Commit 1c38b40635864a26f5ae6efabcd8ee71f0fdc706
Headers show

Comments

Martin von Zweigbergk - Oct. 5, 2014, 6:08 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 a92d006e3263548ab0ce91a49668e30b083213e7
# Parent  5d6fa917f3402b5fcdbdf14e3187fe4b3252763f
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)