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') diff --git a/rust/hg-cpython/src/lib.rs b/rust/hg-cpython/src/lib.rs --- a/rust/hg-cpython/src/lib.rs +++ b/rust/hg-cpython/src/lib.rs @@ -72,6 +72,12 @@ "PatternError", py.get_type::(), )?; + /// Change this version whenever the API is changed + m.add( + py, + "version", + 0, + )?; Ok(()) });