branching: merge default change into stable stable
authorPierre-Yves David <pierre-yves.david@octobus.net>
Thu, 11 Apr 2019 21:12:09 +0200
branchstable
changeset 4508 fce8f5ca10d8
parent 4507 de9089514833 (current diff)
parent 4502 84512556e148 (diff)
child 4509 5875079f2ff5
branching: merge default change into stable
--- a/hgext3rd/evolve/cmdrewrite.py	Thu Apr 11 22:13:55 2019 +0200
+++ b/hgext3rd/evolve/cmdrewrite.py	Thu Apr 11 21:12:09 2019 +0200
@@ -605,8 +605,13 @@
     # uncommit a removed file partially.
     # TODO: wrap the operations in mercurial/patch.py and mercurial/crecord.py
     # to add uncommit as an operation taking care of BC.
-    chunks, opts = cmdutil.recordfilter(repo.ui, originalchunks,
-                                        operation='discard')
+    try:
+        chunks, opts = cmdutil.recordfilter(repo.ui, originalchunks, match,
+                                            operation='discard')
+    except TypeError:
+        # hg <= 4.9 (db72f9f6580e)
+        chunks, opts = cmdutil.recordfilter(repo.ui, originalchunks,
+                                            operation='discard')
     if not chunks:
         raise error.Abort(_("nothing selected to uncommit"))
     fp = stringio()