D6681: debugcommands: add support for extensions adding their own debug info
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Tue Jul 23 15:40:41 EDT 2019
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
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.
diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py
@@ -1383,6 +1383,11 @@
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:
To: durin42, #hg-reviewers
More information about the Mercurial-devel