Patchwork D7398: commands: 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 <e45c805d6c089c50c6cfd58660c68191@localhost.localdomain>
Download mbox | patch
Permalink /patch/43241/
State Not Applicable
Headers show

Comments

phabricator - Nov. 15, 2019, 3:41 a.m.
Closed by commit rHG1e1bad31b427: commands: 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/D7398?vs=18088&id=18126

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

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

AFFECTED FILES
  mercurial/commands.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -2116,13 +2116,13 @@ 
 
         if not node:
             stat = cmdutil.postcommitstatus(repo, pats, opts)
-            if stat[3]:
+            if stat.deleted:
                 ui.status(
                     _(
                         b"nothing changed (%d missing files, see "
                         b"'hg status')\n"
                     )
-                    % len(stat[3])
+                    % len(stat.deleted)
                 )
             else:
                 ui.status(_(b"nothing changed\n"))
@@ -6853,7 +6853,11 @@ 
             opts.get(b'subrepos'),
         )
 
-    changestates = zip(states, pycompat.iterbytestr(b'MAR!?IC'), stat)
+    changestates = zip(
+        states,
+        pycompat.iterbytestr(b'MAR!?IC'),
+        [getattr(stat, s.decode('utf8')) for s in states],
+    )
 
     copy = {}
     if (