# HG changeset patch # User Raphaël Gomès # Date 1583495091 -3600 # Node ID 2954173877693fc3b747a6441bad0006d0a5c27c # Parent 6aee0647e0265ae11351b38a00d6b4c09043a033 debuginstall: print if Rust extensions are installed This should make it easier to use the Rust extensions. Another patch on will be exposing a version and more useful information, but it can only be done on top of this very patch, since it is targeting the stable branch and the API has already changed on the default branch. Differential Revision: https://phab.mercurial-scm.org/D8248 diff -r 6aee0647e026 -r 295417387769 mercurial/debugcommands.py --- a/mercurial/debugcommands.py Fri Mar 06 13:54:35 2020 -0500 +++ b/mercurial/debugcommands.py Fri Mar 06 12:44:51 2020 +0100 @@ -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 diff -r 6aee0647e026 -r 295417387769 tests/test-install.t --- a/tests/test-install.t Fri Mar 06 13:54:35 2020 -0500 +++ b/tests/test-install.t Fri Mar 06 12:44:51 2020 +0100 @@ -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)