D6681: debugcommands: add support for extensions adding their own debug info
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Tue Jul 23 19:40:41 UTC 2019
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
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.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D6681
AFFECTED FILES
mercurial/debugcommands.py
CHANGE DETAILS
diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py
--- 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
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list