Patchwork D8248: debuginstall: print if Rust extensions are installed

login
register
mail settings
Submitter phabricator
Date March 9, 2020, 10:04 a.m.
Message ID <e49e8431066842894a0dc84dea6e27d9@localhost.localdomain>
Download mbox | patch
Permalink /patch/45634/
State Not Applicable
Headers show

Comments

phabricator - March 9, 2020, 10:04 a.m.
Closed by commit rHG69935d41ada4: debuginstall: print if Rust extensions are installed (authored by Alphare).
This revision was automatically updated to reflect the committed changes.

CHANGED PRIOR TO COMMIT
  https://phab.mercurial-scm.org/D8248?vs=20568&id=20618#toc

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D8248?vs=20568&id=20618

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D8248/new/

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

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

CHANGE DETAILS




To: Alphare, #hg-reviewers, pulkit
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
@@ -9,6 +9,7 @@ 
   checking Python security support (*) (glob)
     TLS 1.2 not supported by Python install; network connections lack modern security (?)
     SNI not supported by Python install; may have connectivity issues with some servers (?)
+  checking Rust extensions \((installed|missing)\) (re)
   checking Mercurial version (*) (glob)
   checking Mercurial custom build (*) (glob)
   checking module policy (*) (glob)
@@ -67,6 +68,7 @@ 
   checking Python security support (*) (glob)
     TLS 1.2 not supported by Python install; network connections lack modern security (?)
     SNI not supported by Python install; may have connectivity issues with some servers (?)
+  checking Rust extensions \((installed|missing)\) (re)
   checking Mercurial version (*) (glob)
   checking Mercurial custom build (*) (glob)
   checking module policy (*) (glob)
@@ -113,6 +115,7 @@ 
   checking Python security support (*) (glob)
     TLS 1.2 not supported by Python install; network connections lack modern security (?)
     SNI not supported by Python install; may have connectivity issues with some servers (?)
+  checking Rust extensions \((installed|missing)\) (re)
   checking Mercurial version (*) (glob)
   checking Mercurial custom build (*) (glob)
   checking module policy (*) (glob)
@@ -139,6 +142,7 @@ 
   checking Python security support (*) (glob)
     TLS 1.2 not supported by Python install; network connections lack modern security (?)
     SNI not supported by Python install; may have connectivity issues with some servers (?)
+  checking Rust extensions \((installed|missing)\) (re)
   checking Mercurial version (*) (glob)
   checking Mercurial custom build (*) (glob)
   checking module policy (*) (glob)
@@ -194,6 +198,7 @@ 
   checking Python version (3.*) (glob)
   checking Python lib (*)... (glob)
   checking Python security support (*) (glob)
+  checking Rust extensions \((installed|missing)\) (re)
   checking Mercurial version (*) (glob)
   checking Mercurial custom build (*) (glob)
   checking module policy (*) (glob)
@@ -233,6 +238,7 @@ 
   checking Python security support (*) (glob)
     TLS 1.2 not supported by Python install; network connections lack modern security (?)
     SNI not supported by Python install; may have connectivity issues with some servers (?)
+  checking Rust extensions \((installed|missing)\) (re)
   checking Mercurial version (*) (glob)
   checking Mercurial custom build (*) (glob)
   checking module policy (*) (glob)
diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py
--- a/mercurial/debugcommands.py
+++ b/mercurial/debugcommands.py
@@ -1508,6 +1508,13 @@ 
         pythonlib or _(b"unknown"),
     )
 
+    try:
+        from . import rustext
+
+        rustext.__doc__  # trigger lazy import
+    except ImportError:
+        rustext = None
+
     security = set(sslutil.supportedprotocols)
     if sslutil.hassni:
         security.add(b'sni')
@@ -1535,6 +1542,13 @@ 
             )
         )
 
+    fm.plain(
+        _(
+            b"checking Rust extensions (%s)\n"
+            % (b'missing' if rustext is None else b'installed')
+        ),
+    )
+
     # TODO print CA cert info
 
     # hg version