[PATCH 1 of 4 v2] debuginstall: add mercurial version
Yuya Nishihara
yuya at tcha.org
Fri May 20 09:59:08 EDT 2016
On Wed, 11 May 2016 17:51:24 +0000, timeless wrote:
> # HG changeset patch
> # User timeless <timeless at mozdev.org>
> # Date 1462920345 0
> # Tue May 10 22:45:45 2016 +0000
> # Node ID 2ab114fef14fd6d1ef109043e9300b015b0c0e2f
> # Parent c641b8dfb98c2ade6995ba3aa341fe4d7b154827
> # Available At bb://timeless/mercurial-crew
> # hg pull bb://timeless/mercurial-crew -r 2ab114fef14f
> debuginstall: add mercurial version
Just curious. What's the advantage over "hg version" ?
> diff -r c641b8dfb98c -r 2ab114fef14f mercurial/commands.py
> --- a/mercurial/commands.py Wed May 11 01:46:11 2016 +0000
> +++ b/mercurial/commands.py Tue May 10 22:45:45 2016 +0000
> @@ -2740,6 +2740,13 @@
> 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:]))
I don't think it's worth printing two separate lines for hg version. You can
strip extra part from "hgver" as necessary.
{sub(r"\+.*", "", hgver)}
More information about the Mercurial-devel
mailing list