# HG changeset patch # User Yuya Nishihara # Date 2018-07-14 01:51:52 # Node ID b93dc48e74adfcbb53fc1c9e95b42e30fd32e95e # Parent 992e108212a9ea6c1c8277245f2e563a9c323764 hghave: require clang-format >= 6 due to output change diff --git a/tests/hghave.py b/tests/hghave.py --- a/tests/hghave.py +++ b/tests/hghave.py @@ -452,8 +452,9 @@ def has_pylint(): @check("clang-format", "clang-format C code formatter") def has_clang_format(): - return matchoutput("clang-format --help", - br"^OVERVIEW: A tool to format C/C\+\+[^ ]+ code.") + m = matchoutput('clang-format --version', br'clang-format version (\d)') + # style changed somewhere between 4.x and 6.x + return m and int(m.group(1)) >= 6 @check("jshint", "JSHint static code analysis tool") def has_jshint():