Mercurial > hg
changeset 34766:d957d4475a64
configitems: register the test 'ui.ioerrors' config
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Wed, 11 Oct 2017 04:33:00 +0200 |
parents | f3e4a5ad0d90 |
children | 6338e23c887d |
files | tests/test-rollback.t |
diffstat | 1 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-rollback.t Fri Oct 13 23:53:06 2017 +0200 +++ b/tests/test-rollback.t Wed Oct 11 04:33:00 2017 +0200 @@ -220,10 +220,18 @@ > import errno > from mercurial.i18n import _ > from mercurial import ( + > registrar, > error, > ui as uimod, > ) > + > configtable = {} + > configitem = registrar.configitem(configtable) + > + > configitem('ui', 'ioerrors', + > default=list, + > ) + > > def pretxncommit(ui, repo, **kwargs): > ui.warn('warn during pretxncommit\n') > @@ -245,7 +253,7 @@ > return getattr(self._o, attr) > > def write(self, msg): - > errors = set(self._ui.configlist('ui', 'ioerrors', [])) + > errors = set(self._ui.configlist('ui', 'ioerrors')) > pretxncommit = msg == 'warn during pretxncommit\n' > pretxnclose = msg == 'warn during pretxnclose\n' > txnclose = msg == 'warn during txnclose\n'