[PATCH 1 of 4 v2] debuginstall: add mercurial version

timeless timeless at fmr.im
Wed May 11 17:51:24 UTC 2016


# 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

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:]))
+
     # compiled modules
     fm.write('hgmodules', _("checking installed modules (%s)...\n"),
              os.path.dirname(__file__))
diff -r c641b8dfb98c -r 2ab114fef14f tests/test-install.t
--- a/tests/test-install.t	Wed May 11 01:46:11 2016 +0000
+++ b/tests/test-install.t	Tue May 10 22:45:45 2016 +0000
@@ -4,6 +4,8 @@
   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 @@
     "encodingerror": null,
     "extensionserror": null,
     "hgmodules": "*mercurial", (glob)
+    "hgver": "*", (glob)
+    "hgverextra": "*", (glob)
     "problems": 0,
     "pythonexe": "*", (glob)
     "pythonlib": "*", (glob)
@@ -41,6 +45,8 @@
   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 @@
   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)


More information about the Mercurial-devel mailing list