[gclient] remove output_file from gcs object setdep

We now ask users to preserve the order of objects since there are now
two fields that don't need to updated (output_file and condition).

R=kimstephanie@google.com

Change-Id: Ic2e8c0b350060247458e733f14466145c2af435f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5539331
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Auto-Submit: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Stephanie Kim <kimstephanie@google.com>
changes/31/5539331/4
Josip Sokcevic 10 months ago committed by LUCI CQ
parent e6a370ee1d
commit adfd994f98

@ -4185,7 +4185,7 @@ def CMDsetdep(parser, args):
'object_name2,sha256sum2,size_bytes2,generation2?... '
'The number of revision objects for a given path must '
'match the current number of revision objects for that '
'path.')
'path, and objects order will be preserved.')
parser.add_option(
'--deps-file',
default='DEPS',
@ -4269,20 +4269,16 @@ def CMDsetdep(parser, args):
raw_objects = value.split('?')
for o in raw_objects:
object_info = o.split(',')
if len(object_info) != 4 and len(object_info) != 5:
if len(object_info) != 4:
parser.error(
'All values are required in the revision object: '
'object_name, sha256sum, size_bytes, generation, '
'and (optional) output_file.')
object_dict = {
'object_name, sha256sum, size_bytes and generation.')
objects.append({
'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: # git dependencies
# Update DEPS only when `git_dependencies` == DEPS or SYNC.

@ -813,8 +813,7 @@ def SetGCS(gclient_dict, dep_name, new_objects):
"number of objects.")
# Allow only `keys_to_update` to be updated.
keys_to_update = ('object_name', 'sha256sum', 'size_bytes', 'generation',
'output_file')
keys_to_update = ('object_name', 'sha256sum', 'size_bytes', 'generation')
for index, object_node in enumerate(objects_node.elts):
for key, value in zip(object_node.keys, object_node.values):
if key.s not in keys_to_update:

Loading…
Cancel
Save