Patchwork D7403: subrepo: use field names instead of field numbers on scmutil.status

login
register
mail settings
Submitter phabricator
Date Nov. 15, 2019, 3:43 a.m.
Message ID <64c2b1c39bf9b25d76854b6211b89314@localhost.localdomain>
Download mbox | patch
Permalink /patch/43245/
State Not Applicable
Headers show

Comments

phabricator - Nov. 15, 2019, 3:43 a.m.
Closed by commit rHGaeed2f106213: subrepo: use field names instead of field numbers on scmutil.status (authored by durin42).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7403?vs=18093&id=18131

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7403/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7403

AFFECTED FILES
  mercurial/subrepo.py

CHANGE DETAILS




To: durin42, #hg-reviewers, indygreg
Cc: mercurial-devel

Patch

diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py
--- a/mercurial/subrepo.py
+++ b/mercurial/subrepo.py
@@ -1995,8 +1995,12 @@ 
         if match.always():
             output += self._gitcommand(cmd) + b'\n'
         else:
-            st = self.status(node2)[:3]
-            files = [f for sublist in st for f in sublist]
+            st = self.status(node2)
+            files = [
+                f
+                for sublist in (st.modified, st.added, st.removed)
+                for f in sublist
+            ]
             for f in files:
                 if match(f):
                     output += self._gitcommand(cmd + [b'--', f]) + b'\n'