Patchwork D8248: debuginstall: print if Rust extensions are installed

login
register
mail settings
Submitter phabricator
Date March 6, 2020, 1:51 p.m.
Message ID <992787c6c5391f8d9ed741b3cbebf4bf@localhost.localdomain>
Download mbox | patch
Permalink /patch/45550/
State Not Applicable
Headers show

Comments

phabricator - March 6, 2020, 1:51 p.m.
Alphare updated this revision to Diff 20553.

REPOSITORY
  rHG Mercurial

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

BRANCH
  stable

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

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

AFFECTED FILES
  mercurial/debugcommands.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py
--- a/mercurial/debugcommands.py
+++ b/mercurial/debugcommands.py
@@ -1497,6 +1497,18 @@ 
         pythonlib or _(b"unknown"),
     )
 
+    try:
+        from mercurial import rustext
+        rustext.__doc__  # trigger lazy import
+    except ImportError:
+        rustext = None
+
+    fm.write(
+        b'',
+        _(b"checking Rust extensions (%s)\n"),
+        b'missing' if rustext is None else 'installed',
+    )
+
     security = set(sslutil.supportedprotocols)
     if sslutil.hassni:
         security.add(b'sni')