mercurial/patch.py
changeset 43649 d649de29f1ff
parent 43506 9f70512ae2cf
child 43735 7eb701e355bd
--- 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 []