# HG changeset patch # User Augie Fackler # Date 2019-11-14 20:24:22 # Node ID 7415cd4866965cef9f2aca9c025d0a142b42cf62 # Parent 7edc07fb890cb85c36e5c3bfccae8f1c8233a8b3 extdiff: use field names instead of field numbers on scmutil.status As part of my pytype adventures I want to make scmutil.status no longer a subclass of tuple. This is part of that process. Differential Revision: https://phab.mercurial-scm.org/D7390 diff --git a/hgext/extdiff.py b/hgext/extdiff.py --- a/hgext/extdiff.py +++ b/hgext/extdiff.py @@ -401,13 +401,14 @@ def dodiff(ui, repo, cmdline, pats, opts 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()