From: machenbach@chromium.org Date: Thu, 14 Nov 2013 14:49:07 +0000 (+0000) Subject: Add ChangeLog presubmit check. X-Git-Tag: upstream/4.7.83~11745 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=901e4f60c513a37c3b805be084e98fbc7385f648;p=platform%2Fupstream%2Fv8.git Add ChangeLog presubmit check. LOG= BUG= R=jkummerow@chromium.org Review URL: https://codereview.chromium.org/61733023 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17749 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/PRESUBMIT.py b/PRESUBMIT.py index 75e16e3..fe15157 100644 --- a/PRESUBMIT.py +++ b/PRESUBMIT.py @@ -69,15 +69,28 @@ def _SkipTreeCheck(input_api, output_api): return input_api.environ.get('PRESUBMIT_TREE_CHECK') == 'skip' +def _CheckChangeLogFlag(input_api, output_api): + """Checks usage of LOG= flag in the commit message.""" + results = [] + if input_api.change.BUG and not 'LOG' in input_api.change.tags: + results.append(output_api.PresubmitError( + 'An issue reference (BUG=) requires a change log flag (LOG=). ' + 'Use LOG=Y for including this commit message in the change log. ' + 'Use LOG=N or leave blank otherwise.')) + return results + + def CheckChangeOnUpload(input_api, output_api): results = [] results.extend(_CommonChecks(input_api, output_api)) + results.extend(_CheckChangeLogFlag(input_api, output_api)) return results def CheckChangeOnCommit(input_api, output_api): results = [] results.extend(_CommonChecks(input_api, output_api)) + results.extend(_CheckChangeLogFlag(input_api, output_api)) results.extend(input_api.canned_checks.CheckChangeHasDescription( input_api, output_api)) if not _SkipTreeCheck(input_api, output_api):