Patchwork D7390: extdiff: use field names instead of field numbers on scmutil.status

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

Comments

phabricator - Nov. 15, 2019, 3:37 a.m.
Closed by commit rHG7415cd486696: extdiff: 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/D7390?vs=18080&id=18118

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

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

AFFECTED FILES
  hgext/extdiff.py

CHANGE DETAILS




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

Patch

diff --git a/hgext/extdiff.py b/hgext/extdiff.py
--- a/hgext/extdiff.py
+++ b/hgext/extdiff.py
@@ -401,13 +401,14 @@ 
         if node2 is None:
             raise error.Abort(_(b'--patch requires two revisions'))
     else:
-        mod_a, add_a, rem_a = map(
-            set, repo.status(node1a, node2, matcher, listsubrepos=subrepos)[:3]
-        )
+        st = repo.status(node1a, node2, matcher, listsubrepos=subrepos)
+        mod_a, add_a, rem_a = set(st.modified), set(st.added), set(st.removed)
         if do3way:
-            mod_b, add_b, rem_b = map(
-                set,
-                repo.status(node1b, node2, matcher, listsubrepos=subrepos)[:3],
+            stb = repo.status(node1b, node2, matcher, listsubrepos=subrepos)
+            mod_b, add_b, rem_b = (
+                set(stb.modified),
+                set(stb.added),
+                set(stb.removed),
             )
         else:
             mod_b, add_b, rem_b = set(), set(), set()