From b067ec53726f79a5fea929ca67605f81dd413422 Mon Sep 17 00:00:00 2001 From: "tandrii@chromium.org" Date: Tue, 31 May 2016 15:24:44 +0000 Subject: [PATCH] git cl upload: die when --no-squash has no commit-msg-hook. Otherwise, the program continues, and an exception is printed. The message is still there, but easy to miss. R=andybons@chromium.org BUG= Review-Url: https://codereview.chromium.org/2004303003 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300674 0039d316-1c4b-4281-b951-d872f2087c98 --- git_cl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git_cl.py b/git_cl.py index e19d38c04..35785ebdf 100755 --- a/git_cl.py +++ b/git_cl.py @@ -2528,7 +2528,7 @@ class _GerritChangelistImpl(_ChangelistCodereviewBase): print 'git-cl: Added Change-Id to commit message.' return new_log_desc else: - print >> sys.stderr, 'ERROR: Gerrit commit-msg hook not available.' + DieWithError('ERROR: Gerrit commit-msg hook not installed.') def SetCQState(self, new_state): """Sets the Commit-Queue label assuming canonical CQ config for Gerrit."""