# HG changeset patch # User Augie Fackler # Date 1573763278 18000 # Node ID d649de29f1ffb08268752a57e640803df12f0778 # Parent 4093fc1777c278d629138a076782d601d3028134 patch: 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/D7401 diff -r 4093fc1777c2 -r d649de29f1ff mercurial/patch.py --- a/mercurial/patch.py Thu Nov 14 15:27:50 2019 -0500 +++ b/mercurial/patch.py Thu Nov 14 15:27:58 2019 -0500 @@ -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 []