diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -2740,6 +2740,13 @@ def debuginstall(ui, **opts): fm.write('pythonlib', _("checking Python lib (%s)...\n"), os.path.dirname(os.__file__)) + # hg version + hgver = util.version() + fm.write('hgver', _("checking Mercurial version (%s)\n"), + hgver.split('+')[0]) + fm.write('hgverextra', _("checking Mercurial custom build (%s)\n"), + '+'.join(hgver.split('+')[1:])) + # compiled modules fm.write('hgmodules', _("checking installed modules (%s)...\n"), os.path.dirname(__file__)) diff --git a/tests/test-install.t b/tests/test-install.t --- a/tests/test-install.t +++ b/tests/test-install.t @@ -4,6 +4,8 @@ hg debuginstall checking Python executable (*) (glob) checking Python version (2.*) (glob) checking Python lib (*lib*)... (glob) + checking Mercurial version (*) (glob) + checking Mercurial custom build (*) (glob) checking installed modules (*mercurial)... (glob) checking templates (*mercurial?templates)... (glob) checking default template (*mercurial?templates?map-cmdline.default) (glob) @@ -24,6 +26,8 @@ hg debuginstall JSON "encodingerror": null, "extensionserror": null, "hgmodules": "*mercurial", (glob) + "hgver": "*", (glob) + "hgverextra": "*", (glob) "problems": 0, "pythonexe": "*", (glob) "pythonlib": "*", (glob) @@ -41,6 +45,8 @@ hg debuginstall with no username checking Python executable (*) (glob) checking Python version (2.*) (glob) checking Python lib (*lib*)... (glob) + checking Mercurial version (*) (glob) + checking Mercurial custom build (*) (glob) checking installed modules (*mercurial)... (glob) checking templates (*mercurial?templates)... (glob) checking default template (*mercurial?templates?map-cmdline.default) (glob) @@ -62,6 +68,8 @@ path variables are expanded (~ is the sa checking Python executable (*) (glob) checking Python version (*) (glob) checking Python lib (*lib*)... (glob) + checking Mercurial version (*) (glob) + checking Mercurial custom build (*) (glob) checking installed modules (*mercurial)... (glob) checking templates (*mercurial?templates)... (glob) checking default template (*mercurial?templates?map-cmdline.default) (glob)