topic: fix some API to make it more robust
The new code can deal with changes in upstream mercurial.
--- a/hgext3rd/topic/__init__.py Tue Sep 10 15:43:20 2019 +0700
+++ b/hgext3rd/topic/__init__.py Fri Sep 13 16:04:32 2019 +0200
@@ -393,11 +393,11 @@
finally:
self.ui.restoreconfig(backup)
- def commitctx(self, ctx, error=None):
+ def commitctx(self, ctx, *args, **kwargs):
topicfilter = topicmap.topicfilter(self.filtername)
if topicfilter != self.filtername:
other = self.filtered(topicmap.topicfilter(self.filtername))
- other.commitctx(ctx, error=error)
+ other.commitctx(ctx, *args, **kwargs)
if isinstance(ctx, context.workingcommitctx):
current = self.currenttopic
@@ -409,7 +409,7 @@
and not self.currenttopic):
# we are amending and need to remove a topic
del ctx.extra()[constants.extrakey]
- return super(topicrepo, self).commitctx(ctx, error=error)
+ return super(topicrepo, self).commitctx(ctx, *args, **kwargs)
@property
def topics(self):