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

Unified Diff: scripts/slave/bot_update.py

Issue 278943002: Use real revision mapping in bot_update module (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: rebase Created 6 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
Index: scripts/slave/bot_update.py
diff --git a/scripts/slave/bot_update.py b/scripts/slave/bot_update.py
index 83cd30056a621b3d535b2d3333608575eeadb646..6debd4f219030723fec5f05df5ca77e17e94ef0d 100755
--- a/scripts/slave/bot_update.py
+++ b/scripts/slave/bot_update.py
@@ -983,8 +983,13 @@ def parse_args():
parse.add_option('-f', '--force', action='store_true',
help='Bypass check to see if we want to be run. '
'Should ONLY be used locally.')
- parse.add_option('--revision_mapping')
- parse.add_option('--revision-mapping') # Backwards compatability.
+ parse.add_option('--revision_mapping',
+ help='{"path/to/repo/": "property_name"}')
+ parse.add_option('--revision_mapping_file',
+ help=('Same as revision_mapping, except its a path to a json'
+ ' file containing that format.'))
+ parse.add_option('--revision-mapping', # Backwards compatability.
+ help='DEPRECATED, use "revision_mapping" instead')
# TODO(hinoka): Support root@revision format.
parse.add_option('--revision',
help='Revision to check out. Can be an SVN revision number, '
@@ -1007,7 +1012,16 @@ def parse_args():
help='Output JSON information into a specified file')
- return parse.parse_args()
+ opts, args = parse.parse_args()
Ryan Tseng 2014/05/09 21:33:21 nit: options? for consistency below.
iannucci 2014/05/09 22:11:52 Done.
+
+ if opts.revision_mapping_file is not None:
+ if opts.revision_mapping is not None:
+ print ('WARNING: revision_mapping_file was set at the same '
+ 'time as revision_mapping?')
+ with open(opts.revision_mapping_file, 'r') as f:
+ opts.revision_mapping = json.load(f)
+
+ return opts, args
def main():

Powered by Google App Engine
This is Rietveld 408576698