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

Unified Diff: presubmit_support.py

Issue 115719: Add InputApi.version so the presubmit script can mark a minimum supported version for instance. (Closed)
Patch Set: Created 11 years, 7 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 | « no previous file | tests/presubmit_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: presubmit_support.py
diff --git a/presubmit_support.py b/presubmit_support.py
index 3ab1549870fd16ddde4968c1615144b126acd805..a7b58c8a1798333206d7f2d630d4a8a612c2b545 100755
--- a/presubmit_support.py
+++ b/presubmit_support.py
@@ -6,7 +6,7 @@
"""Enables directory-specific presubmit checks to run at upload and/or commit.
"""
-__version__ = '1.0.1'
+__version__ = '1.1'
# TODO(joi) Add caching where appropriate/needed. The API is designed to allow
# caching (between all different invocations of presubmit scripts for a given
@@ -162,6 +162,8 @@ class InputApi(object):
change: A presubmit.GclChange object.
presubmit_path: The path to the presubmit script being processed.
"""
+ # Version number of the presubmit_support script.
+ self.version = [int(x) for x in __version__.split('.')]
self.change = change
# We expose various modules and functions as attributes of the input_api
« no previous file with comments | « no previous file | tests/presubmit_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698