compat: adjust `wrapadd` for upstream
authorPierre-Yves David <pierre-yves.david@octobus.net>
Tue, 04 Jun 2019 10:07:08 +0200
changeset 4646 7b986968700b
parent 4644 b228672b0ff9
child 4647 228caeb8b7af
compat: adjust `wrapadd` for upstream Mercurial core updated the API in f385ba70e4af.
hgext3rd/topic/__init__.py
--- 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)