Update setdep to take in optional output_file

Bug: b/328065301
Change-Id: I3b17fecd8542ac19a3dfcff1cc830bb7e194d953
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5518038
Reviewed-by: Joanna Wang <jojwang@chromium.org>
Commit-Queue: Stephanie Kim <kimstephanie@google.com>
changes/38/5518038/3
Stephanie Kim 12 months ago committed by LUCI CQ
parent 81d16aaad7
commit 5e65fc3f7a

@ -4183,16 +4183,19 @@ def CMDsetdep(parser, args):
raw_objects = value.split('?')
for o in raw_objects:
object_info = o.split(',')
if len(object_info) != 4:
if len(object_info) != 4 and len(object_info) != 5:
parser.error(
'All 4 values are required in the revision object: '
'object_name, sha256sum, size_bytes, and generation.')
'All values are required in the revision object: '
'object_name, sha256sum, size_bytes, generation, '
'and (optional) output_file.')
object_dict = {
'object_name': object_info[0],
'sha256sum': object_info[1],
'size_bytes': object_info[2],
'generation': object_info[3],
}
if len(object_info) == 5:
object_dict['output_file'] = object_info[4]
objects.append(object_dict)
gclient_eval.SetGCS(local_scope, name, objects)
else:

Loading…
Cancel
Save