transplant: use field names instead of field numbers on scmutil.status
authorAugie Fackler <augie@google.com>
Thu, 14 Nov 2019 15:25:57 -0500
changeset 43642 96edd0c38740
parent 43641 705738def50c
child 43643 d0310f21ee9e
transplant: 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/D7394
hgext/transplant.py
--- a/hgext/transplant.py	Thu Nov 14 15:25:48 2019 -0500
+++ b/hgext/transplant.py	Thu Nov 14 15:25:57 2019 -0500
@@ -443,7 +443,13 @@
                 )
             if merge:
                 repo.setparents(p1, parents[1])
-            modified, added, removed, deleted = repo.status()[:4]
+            st = repo.status()
+            modified, added, removed, deleted = (
+                st.modified,
+                st.added,
+                st.removed,
+                st.deleted,
+            )
             if merge or modified or added or removed or deleted:
                 n = repo.commit(
                     message,