Mercurial > public > mercurial-scm > hg-stable
diff mercurial/debugcommands.py @ 50398:a45460e235a2 stable
re2: fix reporting of availability in `hg debuginstall`
We add and use an official API to check is re2 is available. This prevent the
bug previously in place were debuginstall was considering confusing `None`
(i.e. non-initialized) and `False` (i.e. unavailable).
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sat, 17 Jun 2023 04:05:53 +0200 |
parents | af776c3d5c3e |
children | 0ab3956540a6 |
line wrap: on
line diff
--- a/mercurial/debugcommands.py Sat Jun 17 04:05:18 2023 +0200 +++ b/mercurial/debugcommands.py Sat Jun 17 04:05:53 2023 +0200 @@ -2137,7 +2137,7 @@ ), ) re2 = b'missing' - if util._re2: + if util.has_re2(): re2 = b'available' fm.plain(_(b'checking "re2" regexp engine (%s)\n') % re2) fm.data(re2=bool(util._re2))