diff mercurial/exthelper.py @ 41066:0358cca1dccf

exthelper: reintroduce the ability to register revsets I think this is what Yuya and Boris agreed on.[1] This happens *after* the extsetup phase now (and after the _aftercallback notifications). But this is trivial, mergeable between exthelper instances, and doesn't need to have the extension name supplied when registering. The test needed updating so that extsetup() takes a `ui` argument, as exthelper isn't trying to be backward compatible with 1.3.1. [1] https://www.mercurial-scm.org/pipermail/mercurial-devel/2018-December/125888.html
author Matt Harbison <matt_harbison@yahoo.com>
date Thu, 27 Dec 2018 21:26:17 -0500
parents 7250cbaabde0
children 70ca0e846d25
line wrap: on
line diff
--- a/mercurial/exthelper.py	Sun Dec 23 23:01:51 2018 -0500
+++ b/mercurial/exthelper.py	Thu Dec 27 21:26:17 2018 -0500
@@ -40,12 +40,14 @@
         self.command = registrar.command(self.cmdtable)
         self.configtable = {}
         self.configitem = registrar.configitem(self.configtable)
+        self.revsetpredicate = registrar.revsetpredicate()
 
     def merge(self, other):
         self._uicallables.extend(other._uicallables)
         self._uipopulatecallables.extend(other._uipopulatecallables)
         self._extcallables.extend(other._extcallables)
         self._repocallables.extend(other._repocallables)
+        self.revsetpredicate._table.update(other.revsetpredicate._table)
         self._commandwrappers.extend(other._commandwrappers)
         self._extcommandwrappers.extend(other._extcommandwrappers)
         self._functionwrappers.extend(other._functionwrappers)