changeset 4646:7b986968700b

compat: adjust `wrapadd` for upstream Mercurial core updated the API in f385ba70e4af.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 04 Jun 2019 10:07:08 +0200
parents b228672b0ff9
children 228caeb8b7af
files hgext3rd/topic/__init__.py
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/topic/__init__.py	Mon May 27 02:19:48 2019 +0200
+++ b/hgext3rd/topic/__init__.py	Tue Jun 04 10:07:08 2019 +0200
@@ -569,7 +569,8 @@
             self._extra[constants.extrakey] = ''
 
 def wrapadd(orig, cl, manifest, files, desc, transaction, p1, p2, user,
-            date=None, extra=None, p1copies=None, p2copies=None):
+            date=None, extra=None, p1copies=None, p2copies=None,
+            filesadded=None, filesremoved=None):
     if constants.extrakey in extra and not extra[constants.extrakey]:
         extra = extra.copy()
         del extra[constants.extrakey]
@@ -579,6 +580,11 @@
         kwargs['p1copies'] = p1copies
     if p2copies is not None:
         kwargs['p2copies'] = p2copies
+    # hg <= 5.0 (f385ba70e4af)
+    if filesadded is not None:
+        kwargs['filesadded'] = filesadded
+    if filesremoved is not None:
+        kwargs['filesremoved'] = filesremoved
     return orig(cl, manifest, files, desc, transaction, p1, p2, user,
                 date=date, extra=extra, **kwargs)