# HG changeset patch # User Pierre-Yves David # Date 1493386172 -7200 # Node ID b6ea9049693dc2186b27b08bba1c6e5d327e80f9 # Parent a4c5744a7b93f22d59094f8a12401afcab4009ef topic: directly use "super" call That is how one is supposed to do it. diff -r a4c5744a7b93 -r b6ea9049693d hgext3rd/topic/__init__.py --- a/hgext3rd/topic/__init__.py Tue Apr 25 10:56:55 2017 +0200 +++ b/hgext3rd/topic/__init__.py Fri Apr 28 15:29:32 2017 +0200 @@ -154,7 +154,6 @@ def reposetup(ui, repo): - orig = repo.__class__ if not isinstance(repo, localrepo.localrepository): return # this can be a peer in the ssh case (puzzling) @@ -171,7 +170,7 @@ if repo.currenttopic != repo['.'].topic(): # bypass the core "nothing changed" logic self.ui.setconfig('ui', 'allowemptycommit', True) - return orig.commit(self, *args, **kwargs) + return super(topicrepo, self).commit(*args, **kwargs) finally: self.ui.restoreconfig(backup) @@ -187,7 +186,7 @@ # we are amending and need to remove a topic del ctx.extra()[constants.extrakey] with topicmap.usetopicmap(self): - return orig.commitctx(self, ctx, error=error) + return super(topicrepo, self).commitctx(ctx, error=error) @property def topics(self):