Mercurial > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
41065:0840862977c8 | 41066:0358cca1dccf |
---|---|
38 self._duckpunchers = [] | 38 self._duckpunchers = [] |
39 self.cmdtable = {} | 39 self.cmdtable = {} |
40 self.command = registrar.command(self.cmdtable) | 40 self.command = registrar.command(self.cmdtable) |
41 self.configtable = {} | 41 self.configtable = {} |
42 self.configitem = registrar.configitem(self.configtable) | 42 self.configitem = registrar.configitem(self.configtable) |
43 self.revsetpredicate = registrar.revsetpredicate() | |
43 | 44 |
44 def merge(self, other): | 45 def merge(self, other): |
45 self._uicallables.extend(other._uicallables) | 46 self._uicallables.extend(other._uicallables) |
46 self._uipopulatecallables.extend(other._uipopulatecallables) | 47 self._uipopulatecallables.extend(other._uipopulatecallables) |
47 self._extcallables.extend(other._extcallables) | 48 self._extcallables.extend(other._extcallables) |
48 self._repocallables.extend(other._repocallables) | 49 self._repocallables.extend(other._repocallables) |
50 self.revsetpredicate._table.update(other.revsetpredicate._table) | |
49 self._commandwrappers.extend(other._commandwrappers) | 51 self._commandwrappers.extend(other._commandwrappers) |
50 self._extcommandwrappers.extend(other._extcommandwrappers) | 52 self._extcommandwrappers.extend(other._extcommandwrappers) |
51 self._functionwrappers.extend(other._functionwrappers) | 53 self._functionwrappers.extend(other._functionwrappers) |
52 self._duckpunchers.extend(other._duckpunchers) | 54 self._duckpunchers.extend(other._duckpunchers) |
53 self.cmdtable.update(other.cmdtable) | 55 self.cmdtable.update(other.cmdtable) |