Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(612)

Unified Diff: presubmit_canned_checks.py

Issue 7253015: Remove manual --tbr support and convert it into automatic TBR= detection. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: removed tests/tbr.sh Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « git_cl.py ('k') | presubmit_support.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: presubmit_canned_checks.py
diff --git a/presubmit_canned_checks.py b/presubmit_canned_checks.py
index 4f267ca6677959d5e8c954dff8067cc77c4bd57c..a69bacee4ebd630a8377bfa1983b201e9be3e75b 100644
--- a/presubmit_canned_checks.py
+++ b/presubmit_canned_checks.py
@@ -63,6 +63,16 @@ def CheckChangeHasDescription(input_api, output_api):
return [output_api.PresubmitNotifyResult('Add a description.')]
return []
+
+def CheckChangeWasUploaded(input_api, output_api):
+ """Checks that the issue was uploaded before committing."""
Nico 2011/07/24 19:59:33 This warns if I patch in someone else's patch with
+ if (input_api.is_committing and
+ (not input_api.change.issue or not input_api.change.patchset)):
+ return [output_api.PresubmitError(
+ 'Issue wasn\'t uploaded. Please upload first.')]
+ return []
+
+
### Content checks
def CheckDoNotSubmitInFiles(input_api, output_api):
@@ -929,5 +939,8 @@ def PanProjectChecks(input_api, output_api,
snapshot("checking license")
results.extend(input_api.canned_checks.CheckLicense(
input_api, output_api, license_header, source_file_filter=sources))
+ snapshot("checking was uploaded")
+ results.extend(input_api.canned_checks.CheckChangeWasUploaded(
+ input_api, output_api))
snapshot("done")
return results
« no previous file with comments | « git_cl.py ('k') | presubmit_support.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698