##// END OF EJS Templates
dispatch: handle empty `testedwith` value in extension...
Pierre-Yves David -
r18224:0f901311 stable
parent child Browse files
Show More
@@ -217,11 +217,11 b' def _runcatch(req):'
217 ct = tuplever(compare)
217 ct = tuplever(compare)
218 worst = None, ct, ''
218 worst = None, ct, ''
219 for name, mod in extensions.extensions():
219 for name, mod in extensions.extensions():
220 testedwith = getattr(mod, 'testedwith', 'unknown')
220 testedwith = getattr(mod, 'testedwith', '')
221 report = getattr(mod, 'buglink', _('the extension author.'))
221 report = getattr(mod, 'buglink', _('the extension author.'))
222 if testedwith == 'unknown':
222 if not testedwith.strip():
223 # We found an untested extension. It's likely the culprit.
223 # We found an untested extension. It's likely the culprit.
224 worst = name, testedwith, report
224 worst = name, 'unknown', report
225 break
225 break
226 if compare not in testedwith.split() and testedwith != 'internal':
226 if compare not in testedwith.split() and testedwith != 'internal':
227 tested = [tuplever(v) for v in testedwith.split()]
227 tested = [tuplever(v) for v in testedwith.split()]
@@ -498,6 +498,16 b' No declared supported version, extension'
498 ** Python * (glob)
498 ** Python * (glob)
499 ** Mercurial Distributed SCM * (glob)
499 ** Mercurial Distributed SCM * (glob)
500 ** Extensions loaded: throw
500 ** Extensions loaded: throw
501 empty declaration of supported version, extension complains:
502 $ echo "testedwith = ''" >> throw.py
503 $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*'
504 ** Unknown exception encountered with possibly-broken third-party extension throw
505 ** which supports versions unknown of Mercurial.
506 ** Please disable throw and try your action again.
507 ** If that fixes the bug please report it to the extension author.
508 ** Python * (glob)
509 ** Mercurial Distributed SCM (*) (glob)
510 ** Extensions loaded: throw
501 If the extension specifies a buglink, show that:
511 If the extension specifies a buglink, show that:
502 $ echo 'buglink = "http://example.com/bts"' >> throw.py
512 $ echo 'buglink = "http://example.com/bts"' >> throw.py
503 $ rm -f throw.pyc throw.pyo
513 $ rm -f throw.pyc throw.pyo
General Comments 0
You need to be logged in to leave comments. Login now