From 5e65fc3f7a22a3a9cb03f3ec58bc5e5374ccdadc Mon Sep 17 00:00:00 2001 From: Stephanie Kim Date: Mon, 6 May 2024 21:31:45 +0000 Subject: [PATCH] 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 Commit-Queue: Stephanie Kim --- gclient.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/gclient.py b/gclient.py index 16347a70d..c180c6aef 100755 --- a/gclient.py +++ b/gclient.py @@ -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: