diff -r 43e15277498e -r 73cf8b56c2f5 tests/hghave.py --- a/tests/hghave.py Wed Oct 16 17:21:03 2024 +0200 +++ b/tests/hghave.py Tue Oct 22 15:50:47 2024 +0200 @@ -624,12 +624,13 @@ return matchoutput("pylint --help", br"[Uu]sage:[ ]+pylint", True) -@check("clang-format", "clang-format C code formatter (>= 11)") +@check("clang-format", "clang-format C code formatter (11 <= … < 19)") def has_clang_format(): m = matchoutput('clang-format --version', br'clang-format version (\d+)') - # style changed somewhere between 10.x and 11.x + # style changed somewhere between 10.x and 11.x and after 19. if m: - return int(m.group(1)) >= 11 + major_version = int(m.group(1)) + return 11 <= major_version < 19 # Assist Googler contributors, they have a centrally-maintained version of # clang-format that is generally very fresh, but unlike most builds (both # official and unofficial), it does *not* include a version number.