diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py --- a/mercurial/dispatch.py +++ b/mercurial/dispatch.py @@ -335,7 +335,7 @@ def _runcatch(req): compare = myver.split('+')[0] ct = tuplever(compare) worst = None, ct, '' - if True: + if ui.config('ui', 'supportcontact', None) is None: for name, mod in extensions.extensions(): testedwith = getattr(mod, 'testedwith', '') report = getattr(mod, 'buglink', _('the extension author.')) @@ -367,9 +367,11 @@ def _runcatch(req): '** If that fixes the bug please report it to %s\n') % (name, testedwith, name, report)) else: + bugtracker = ui.config('ui', 'supportcontact', None) + if bugtracker is None: + bugtracker = _("http://mercurial.selenic.com/wiki/BugTracker") warning = (_("** unknown exception encountered, " - "please report by visiting\n") + - _("** http://mercurial.selenic.com/wiki/BugTracker\n")) + "please report by visiting\n** ") + bugtracker + '\n') warning += ((_("** Python %s\n") % sys.version.replace('\n', '')) + (_("** Mercurial Distributed SCM (version %s)\n") % myver) + (_("** Extensions loaded: %s\n") % diff --git a/mercurial/help/config.txt b/mercurial/help/config.txt --- a/mercurial/help/config.txt +++ b/mercurial/help/config.txt @@ -1511,6 +1511,11 @@ User interface controls. ``style`` Name of style to use for command output. +``supportcontact`` + Location pointed at in Mercurial traceback for reporting crash. Use this if + you are a large organisation with it's own Mercurial deployement process and + crash reports should be addressed to your internal support. + ``timeout`` The timeout used when a lock is held (in seconds), a negative value means no timeout. (default: 600) diff --git a/tests/test-extension.t b/tests/test-extension.t --- a/tests/test-extension.t +++ b/tests/test-extension.t @@ -943,6 +943,15 @@ Older extension is tested with current v ** Mercurial Distributed SCM (version 1.9.3) ** Extensions loaded: throw, older +Ability to point to a different point + $ hg --config extensions.throw=throw.py --config extensions.older=older.py \ + > --config ui.supportcontact='Your Local Goat Lenders' throw 2>&1 | egrep '^\*\*' + ** unknown exception encountered, please report by visiting + ** Your Local Goat Lenders + ** Python * (glob) + ** Mercurial Distributed SCM (*) (glob) + ** Extensions loaded: throw, older + Declare the version as supporting this hg version, show regular bts link: $ hgver=`$PYTHON -c 'from mercurial import util; print util.version().split("+")[0]'` $ echo 'testedwith = """'"$hgver"'"""' >> throw.py