Mercurial > public > mercurial-scm > hg
diff tests/test-rollback.t @ 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 | eb586ed5d8ce |
children | fb9b8004e1b0 |
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'