Patchwork D7979: debugcommands: add Python implementation to debuginstall

login
register
mail settings
Submitter phabricator
Date Jan. 23, 2020, 6:54 a.m.
Message ID <differential-rev-PHID-DREV-d5ikaakz6xjmmm2mcrse-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/44588/
State Superseded
Headers show

Comments

phabricator - Jan. 23, 2020, 6:54 a.m.
indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  This seems like a useful detail to print.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D7979

AFFECTED FILES
  mercurial/debugcommands.py
  tests/test-install.t

CHANGE DETAILS




To: indygreg, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/tests/test-install.t b/tests/test-install.t
--- a/tests/test-install.t
+++ b/tests/test-install.t
@@ -2,6 +2,7 @@ 
   $ hg debuginstall
   checking encoding (ascii)...
   checking Python executable (*) (glob)
+  checking Python implementation (*) (glob)
   checking Python version (2.*) (glob) (no-py3 !)
   checking Python version (3.*) (glob) (py3 !)
   checking Python lib (.*[Ll]ib.*)... (re)
@@ -43,6 +44,7 @@ 
     "hgverextra": "*", (glob)
     "problems": 0,
     "pythonexe": "*", (glob)
+    "pythonimplementation": "*", (glob)
     "pythonlib": "*", (glob)
     "pythonsecurity": [*], (glob)
     "pythonver": "*.*.*", (glob)
@@ -58,6 +60,7 @@ 
   $ HGUSER= hg debuginstall
   checking encoding (ascii)...
   checking Python executable (*) (glob)
+  checking Python implementation (*) (glob)
   checking Python version (2.*) (glob) (no-py3 !)
   checking Python version (3.*) (glob) (py3 !)
   checking Python lib (.*[Ll]ib.*)... (re)
@@ -103,6 +106,7 @@ 
   $ HGEDITOR="~/tools/testeditor.exe" hg debuginstall
   checking encoding (ascii)...
   checking Python executable (*) (glob)
+  checking Python implementation (*) (glob)
   checking Python version (2.*) (glob) (no-py3 !)
   checking Python version (3.*) (glob) (py3 !)
   checking Python lib (.*[Ll]ib.*)... (re)
@@ -128,6 +132,7 @@ 
   $ HGEDITOR="c:\foo\bar\baz.exe -y -z" hg debuginstall
   checking encoding (ascii)...
   checking Python executable (*) (glob)
+  checking Python implementation (*) (glob)
   checking Python version (2.*) (glob) (no-py3 !)
   checking Python version (3.*) (glob) (py3 !)
   checking Python lib (.*[Ll]ib.*)... (re)
@@ -185,6 +190,7 @@ 
   $ ./installenv/*/hg debuginstall || cat pip.log
   checking encoding (ascii)...
   checking Python executable (*) (glob)
+  checking Python implementation (*) (glob)
   checking Python version (3.*) (glob)
   checking Python lib (*)... (glob)
   checking Python security support (*) (glob)
@@ -221,6 +227,7 @@ 
   $ ./installenv/*/hg debuginstall || cat pip.log
   checking encoding (ascii)...
   checking Python executable (*) (glob)
+  checking Python implementation (*) (glob)
   checking Python version (2.*) (glob)
   checking Python lib (*)... (glob)
   checking Python security support (*) (glob)
diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py
--- a/mercurial/debugcommands.py
+++ b/mercurial/debugcommands.py
@@ -13,6 +13,7 @@ 
 import errno
 import operator
 import os
+import platform
 import random
 import re
 import socket
@@ -1487,6 +1488,11 @@ 
         pycompat.sysexecutable or _(b"unknown"),
     )
     fm.write(
+        b'pythonimplementation',
+        _(b"checking Python implementation (%s)\n"),
+        pycompat.sysbytes(platform.python_implementation()),
+    )
+    fm.write(
         b'pythonver',
         _(b"checking Python version (%s)\n"),
         (b"%d.%d.%d" % sys.version_info[:3]),