compat: adjust `wrapadd` for upstream
Mercurial core updated the API in f385ba70e4af.
--- 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)