Bug 1535829 - Disable the clang-format hook and point to the extension r=sheehan
authorSylvestre Ledru <sledru@mozilla.com>
Mon, 18 Mar 2019 17:13:52 +0000
changeset 464867 a108772f1d772959dbc622999da19900b76ecd95
parent 464866 2f95100eef2277c77140165bfcc399dd11a07b4d
child 464868 109e792d2ff668afba0d1ec944cd1f1063375650
push id80750
push usersledru@mozilla.com
push dateMon, 18 Mar 2019 19:44:19 +0000
treeherderautoland@a108772f1d77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssheehan
bugs1535829
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1535829 - Disable the clang-format hook and point to the extension r=sheehan Differential Revision: https://phabricator.services.mozilla.com/D23788
tools/lint/hooks_clang_format.py
--- a/tools/lint/hooks_clang_format.py
+++ b/tools/lint/hooks_clang_format.py
@@ -40,18 +40,21 @@ def run_clang_format(hooktype, args):
         subprocess.Popen(clang_format_cmd)
         return False
 
     print("warning: '{}' is not a valid clang-format hooktype".format(hooktype))
     return False
 
 
 def hg(ui, repo, node, **kwargs):
-    hooktype = kwargs['hooktype']
-    return run_clang_format(hooktype, kwargs.get('pats', []))
+    print("warning: this hook has been deprecated. Please use the hg extension instead.\n"
+          "please add 'clang-format = ~/.mozbuild/version-control-tools/hgext/clang-format'"
+          " to hgrc\n"
+          "Or run 'mach bootstrap'")
+    return False
 
 
 def git():
     hooktype = os.path.basename(__file__)
     if hooktype == 'hooks_clang_format.py':
         hooktype = 'pre-push'
     return run_clang_format(hooktype, [])