topic: fix some API to make it more robust stable
authorValentin Gatien-Baron <vgatien-baron@janestreet.com>
Fri, 13 Sep 2019 16:04:32 +0200
branchstable
changeset 4842 ee0866a279da
parent 4841 95d2b5440731
child 4843 d6e2820dac1f
topic: fix some API to make it more robust The new code can deal with changes in upstream mercurial.
hgext3rd/topic/__init__.py
--- 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):