Patchwork D7401: patch: 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 <0c0d74c26cda390704e20e14bb1b1833@localhost.localdomain>
Download mbox | patch
Permalink /patch/43242/
State Not Applicable
Headers show

Comments

phabricator - Nov. 15, 2019, 3:41 a.m.
Closed by commit rHGd649de29f1ff: patch: 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/D7401?vs=18091&id=18129

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

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

AFFECTED FILES
  mercurial/patch.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/patch.py b/mercurial/patch.py
--- a/mercurial/patch.py
+++ b/mercurial/patch.py
@@ -2605,7 +2605,14 @@ 
 
     if not changes:
         changes = ctx1.status(ctx2, match=match)
-    modified, added, removed = changes[:3]
+    if isinstance(changes, list):
+        modified, added, removed = changes[:3]
+    else:
+        modified, added, removed = (
+            changes.modified,
+            changes.added,
+            changes.removed,
+        )
 
     if not modified and not added and not removed:
         return []