# HG changeset patch # User Raphaël Gomès # Date 2020-03-05 09:24:45 # Node ID c989737158aa8036b60c22d4cd0f2a87f1b83896 # Parent d4f19eb471ca22f161cb817075e153638b13d55e debuginstall: add entry about re2 Rust bindings when applicable Differential Revision: https://phab.mercurial-scm.org/D8226 diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py --- a/mercurial/debugcommands.py +++ b/mercurial/debugcommands.py @@ -1650,6 +1650,13 @@ def debuginstall(ui, **opts): fm.plain(_(b'checking "re2" regexp engine (%s)\n') % re2) fm.data(re2=bool(util._re2)) + rust_debug_mod = policy.importrust("debug") + if rust_debug_mod is not None: + re2_rust = b'installed' if rust_debug_mod.re2_installed else b'missing' + + msg = b'checking "re2" regexp engine Rust bindings (%s)\n' + fm.plain(_(msg % re2_rust)) + # templates p = templater.templatepaths() fm.write(b'templatedirs', b'checking templates (%s)...\n', b' '.join(p)) diff --git a/tests/test-install.t b/tests/test-install.t --- a/tests/test-install.t +++ b/tests/test-install.t @@ -18,6 +18,7 @@ hg debuginstall checking available compression engines (*zlib*) (glob) checking available compression engines for wire protocol (*zlib*) (glob) checking "re2" regexp engine \((available|missing)\) (re) + checking "re2" regexp engine Rust bindings \((installed|missing)\) (re) checking templates (*mercurial?templates)... (glob) checking default template (*mercurial?templates?map-cmdline.default) (glob) checking commit editor... (*) (glob) @@ -77,6 +78,7 @@ hg debuginstall with no username checking available compression engines (*zlib*) (glob) checking available compression engines for wire protocol (*zlib*) (glob) checking "re2" regexp engine \((available|missing)\) (re) + checking "re2" regexp engine Rust bindings \((installed|missing)\) (re) checking templates (*mercurial?templates)... (glob) checking default template (*mercurial?templates?map-cmdline.default) (glob) checking commit editor... (*) (glob) @@ -124,6 +126,7 @@ path variables are expanded (~ is the sa checking available compression engines (*zlib*) (glob) checking available compression engines for wire protocol (*zlib*) (glob) checking "re2" regexp engine \((available|missing)\) (re) + checking "re2" regexp engine Rust bindings \((installed|missing)\) (re) checking templates (*mercurial?templates)... (glob) checking default template (*mercurial?templates?map-cmdline.default) (glob) checking commit editor... ($TESTTMP/tools/testeditor.exe) @@ -151,6 +154,7 @@ not found (this is intentionally using b checking available compression engines (*zlib*) (glob) checking available compression engines for wire protocol (*zlib*) (glob) checking "re2" regexp engine \((available|missing)\) (re) + checking "re2" regexp engine Rust bindings \((installed|missing)\) (re) checking templates (*mercurial?templates)... (glob) checking default template (*mercurial?templates?map-cmdline.default) (glob) checking commit editor... (c:\foo\bar\baz.exe) (windows !) @@ -207,6 +211,7 @@ since it's bin on most platforms but Scr checking available compression engines (*) (glob) checking available compression engines for wire protocol (*) (glob) checking "re2" regexp engine \((available|missing)\) (re) + checking "re2" regexp engine Rust bindings \((installed|missing)\) (re) checking templates ($TESTTMP/installenv/*/site-packages/mercurial/templates)... (glob) checking default template ($TESTTMP/installenv/*/site-packages/mercurial/templates/map-cmdline.default) (glob) checking commit editor... (*) (glob) @@ -247,6 +252,7 @@ since it's bin on most platforms but Scr checking available compression engines (*) (glob) checking available compression engines for wire protocol (*) (glob) checking "re2" regexp engine \((available|missing)\) (re) + checking "re2" regexp engine Rust bindings \((installed|missing)\) (re) checking templates ($TESTTMP/installenv/*/site-packages/mercurial/templates)... (glob) checking default template ($TESTTMP/installenv/*/site-packages/mercurial/templates/map-cmdline.default) (glob) checking commit editor... (*) (glob)