##// END OF EJS Templates
extensions: always include traceback when extension setup fails...
Martin von Zweigbergk -
r34846:78d9a7b7 default
parent child Browse files
Show More
@@ -182,7 +182,7 b' def _runuisetup(name, ui):'
182 try:
182 try:
183 uisetup(ui)
183 uisetup(ui)
184 except Exception as inst:
184 except Exception as inst:
185 ui.traceback()
185 ui.traceback(force=True)
186 msg = util.forcebytestr(inst)
186 msg = util.forcebytestr(inst)
187 ui.warn(_("*** failed to set up extension %s: %s\n") % (name, msg))
187 ui.warn(_("*** failed to set up extension %s: %s\n") % (name, msg))
188 return False
188 return False
@@ -203,7 +203,7 b' def _runextsetup(name, ui):'
203 raise
203 raise
204 extsetup() # old extsetup with no ui argument
204 extsetup() # old extsetup with no ui argument
205 except Exception as inst:
205 except Exception as inst:
206 ui.traceback()
206 ui.traceback(force=True)
207 msg = util.forcebytestr(inst)
207 msg = util.forcebytestr(inst)
208 ui.warn(_("*** failed to set up extension %s: %s\n") % (name, msg))
208 ui.warn(_("*** failed to set up extension %s: %s\n") % (name, msg))
209 return False
209 return False
@@ -524,15 +524,6 b" Make sure a broken uisetup doesn't globa"
524
524
525 Even though the extension fails during uisetup, hg is still basically usable:
525 Even though the extension fails during uisetup, hg is still basically usable:
526 $ hg --config extensions.baduisetup=$TESTTMP/baduisetup.py version
526 $ hg --config extensions.baduisetup=$TESTTMP/baduisetup.py version
527 *** failed to set up extension baduisetup: integer division or modulo by zero
528 Mercurial Distributed SCM (version *) (glob)
529 (see https://mercurial-scm.org for more information)
530
531 Copyright (C) 2005-2017 Matt Mackall and others
532 This is free software; see the source for copying conditions. There is NO
533 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
534
535 $ hg --config extensions.baduisetup=$TESTTMP/baduisetup.py version --traceback
536 Traceback (most recent call last):
527 Traceback (most recent call last):
537 File "*/mercurial/extensions.py", line *, in _runuisetup (glob)
528 File "*/mercurial/extensions.py", line *, in _runuisetup (glob)
538 uisetup(ui)
529 uisetup(ui)
@@ -162,8 +162,18 b''
162 > duplicate=$TESTDIR/flagprocessorext.py
162 > duplicate=$TESTDIR/flagprocessorext.py
163 > EOF
163 > EOF
164 $ hg debugrebuilddirstate
164 $ hg debugrebuilddirstate
165 Traceback (most recent call last):
166 File "*/mercurial/extensions.py", line *, in _runextsetup (glob)
167 extsetup(ui)
168 File "*/tests/flagprocessorext.py", line *, in extsetup (glob)
169 validatehash,
170 File "*/mercurial/revlog.py", line *, in addflagprocessor (glob)
171 raise error.Abort(msg)
172 Abort: cannot register multiple processors on flag '0x8'.
165 *** failed to set up extension duplicate: cannot register multiple processors on flag '0x8'.
173 *** failed to set up extension duplicate: cannot register multiple processors on flag '0x8'.
166 $ hg st 2>&1 | egrep 'cannot register multiple processors|flagprocessorext'
174 $ hg st 2>&1 | egrep 'cannot register multiple processors|flagprocessorext'
175 File "*/tests/flagprocessorext.py", line *, in extsetup (glob)
176 Abort: cannot register multiple processors on flag '0x8'.
167 *** failed to set up extension duplicate: cannot register multiple processors on flag '0x8'.
177 *** failed to set up extension duplicate: cannot register multiple processors on flag '0x8'.
168 File "*/tests/flagprocessorext.py", line *, in b64decode (glob)
178 File "*/tests/flagprocessorext.py", line *, in b64decode (glob)
169
179
General Comments 0
You need to be logged in to leave comments. Login now