# HG changeset patch # User Augie Fackler # Date 2019-07-23 18:37:51 # Node ID 7f1df70194972a5ff93c318b5b7f593e826c3408 # Parent ab1900323b1d334a4211669cc6f483413b625013 debugcommands: add support for extensions adding their own debug info We've had a couple of cases where it'd be handy at Google to add data to `hg debuginstall`'s output. We've kludged around that at various times, but it seems reasonable to let extensions add their own data here so extension maintainers can get useful extra data. Differential Revision: https://phab.mercurial-scm.org/D6681 diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py --- a/mercurial/debugcommands.py +++ b/mercurial/debugcommands.py @@ -1383,6 +1383,11 @@ def debuginstall(ui, **opts): fm.condwrite(err, 'usernameerror', _("checking username...\n %s\n" " (specify a username in your configuration file)\n"), err) + for name, mod in extensions.extensions(): + handler = getattr(mod, 'debuginstall', None) + if handler is not None: + problems += handler(ui, fm) + fm.condwrite(not problems, '', _("no problems detected\n")) if not problems: