Mercurial > public > mercurial-scm > hg-stable
comparison 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 |
comparison
equal
deleted
inserted
replaced
50397:293e1763982e | 50398:a45460e235a2 |
---|---|
2135 fmt=b'%s', | 2135 fmt=b'%s', |
2136 sep=b', ', | 2136 sep=b', ', |
2137 ), | 2137 ), |
2138 ) | 2138 ) |
2139 re2 = b'missing' | 2139 re2 = b'missing' |
2140 if util._re2: | 2140 if util.has_re2(): |
2141 re2 = b'available' | 2141 re2 = b'available' |
2142 fm.plain(_(b'checking "re2" regexp engine (%s)\n') % re2) | 2142 fm.plain(_(b'checking "re2" regexp engine (%s)\n') % re2) |
2143 fm.data(re2=bool(util._re2)) | 2143 fm.data(re2=bool(util._re2)) |
2144 | 2144 |
2145 # templates | 2145 # templates |