Index: scripts/slave/bot_update.py |
diff --git a/scripts/slave/bot_update.py b/scripts/slave/bot_update.py |
index 1df92f1b25a03ee57db1711f48a6da22a00cab65..b25b6a8702976dd23dfedeba5bd36b4a833e1e87 100755 |
--- a/scripts/slave/bot_update.py |
+++ b/scripts/slave/bot_update.py |
@@ -1038,8 +1038,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, ' |
@@ -1062,7 +1067,16 @@ def parse_args(): |
help='Output JSON information into a specified file') |
- return parse.parse_args() |
+ options, args = parse.parse_args() |
+ |
+ if options.revision_mapping_file is not None: |
+ if options.revision_mapping is not None: |
+ print ('WARNING: revision_mapping_file was set at the same ' |
+ 'time as revision_mapping?') |
+ with open(options.revision_mapping_file, 'r') as f: |
+ options.revision_mapping = json.load(f) |
+ |
+ return options, args |
def main(): |