##// END OF EJS Templates
configitems: register the test 'ui.ioerrors' config
Boris Feld -
r34767:d957d447 default
parent child Browse files
Show More
@@ -220,10 +220,18 b' I/O errors on stdio are handled properly'
220 220 > import errno
221 221 > from mercurial.i18n import _
222 222 > from mercurial import (
223 > registrar,
223 224 > error,
224 225 > ui as uimod,
225 226 > )
226 227 >
228 > configtable = {}
229 > configitem = registrar.configitem(configtable)
230 >
231 > configitem('ui', 'ioerrors',
232 > default=list,
233 > )
234 >
227 235 > def pretxncommit(ui, repo, **kwargs):
228 236 > ui.warn('warn during pretxncommit\n')
229 237 >
@@ -245,7 +253,7 b' I/O errors on stdio are handled properly'
245 253 > return getattr(self._o, attr)
246 254 >
247 255 > def write(self, msg):
248 > errors = set(self._ui.configlist('ui', 'ioerrors', []))
256 > errors = set(self._ui.configlist('ui', 'ioerrors'))
249 257 > pretxncommit = msg == 'warn during pretxncommit\n'
250 258 > pretxnclose = msg == 'warn during pretxnclose\n'
251 259 > txnclose = msg == 'warn during txnclose\n'
General Comments 0
You need to be logged in to leave comments. Login now