changeset 43639:52a73fb498a4

hgk: use field names instead of field numbers on scmutil.status As part of my pytype adventures I want to make scmutil.status no longer a subclass of tuple. This is part of that process. Differential Revision: https://phab.mercurial-scm.org/D7391
author Augie Fackler <augie@google.com>
date Thu, 14 Nov 2019 15:25:26 -0500
parents 7415cd486696
children 2d5b991c2192
files hgext/hgk.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/hgk.py	Thu Nov 14 15:24:22 2019 -0500
+++ b/hgext/hgk.py	Thu Nov 14 15:25:26 2019 -0500
@@ -92,21 +92,21 @@
         mmap = repo[node1].manifest()
         mmap2 = repo[node2].manifest()
         m = scmutil.match(repo[node1], files)
-        modified, added, removed = repo.status(node1, node2, m)[:3]
+        st = repo.status(node1, node2, m)
         empty = short(nullid)
 
-        for f in modified:
+        for f in st.modified:
             # TODO get file permissions
             ui.writenoi18n(
                 b":100664 100664 %s %s M\t%s\t%s\n"
                 % (short(mmap[f]), short(mmap2[f]), f, f)
             )
-        for f in added:
+        for f in st.added:
             ui.writenoi18n(
                 b":000000 100664 %s %s N\t%s\t%s\n"
                 % (empty, short(mmap2[f]), f, f)
             )
-        for f in removed:
+        for f in st.removed:
             ui.writenoi18n(
                 b":100664 000000 %s %s D\t%s\t%s\n"
                 % (short(mmap[f]), empty, f, f)