Patchwork D7399: context: use field names instead of field numbers on scmutil.status

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

Comments

phabricator - Nov. 15, 2019, 3:41 a.m.
Closed by commit rHGe035a8f71d52: context: 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/D7399?vs=18089&id=18127

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

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

AFFECTED FILES
  mercurial/context.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -449,11 +449,25 @@ 
                     unknown=listunknown,
                     listsubrepos=True,
                 )
-                for rfiles, sfiles in zip(r, s):
+                for k in (
+                    'modified',
+                    'added',
+                    'removed',
+                    'deleted',
+                    'unknown',
+                    'ignored',
+                    'clean',
+                ):
+                    rfiles, sfiles = getattr(r, k), getattr(s, k)
                     rfiles.extend(b"%s/%s" % (subpath, f) for f in sfiles)
 
-        for l in r:
-            l.sort()
+        r.modified.sort()
+        r.added.sort()
+        r.removed.sort()
+        r.deleted.sort()
+        r.unknown.sort()
+        r.ignored.sort()
+        r.clean.sort()
 
         return r