Set default value newly gitlinks from applied patches.

Bug: 1471685
Change-Id: I850778f030f77bda746227c3e2fde4bbaee55a3c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4775447
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Joanna Wang <jojwang@chromium.org>
Auto-Submit: Joanna Wang <jojwang@chromium.org>
changes/47/4775447/3
Joanna Wang 2 years ago committed by LUCI CQ
parent f90cc29837
commit e460dac109

@ -995,9 +995,17 @@ class Dependency(gclient_utils.WorkItem, DependencySettings):
path = module['path']
else:
path = f'{self.name}/{module["path"]}'
# TODO(crbug.com/1471685): Temporary hack. In case of applied patches
# where the changes are staged but not committed, any gitlinks from
# the patch are not returned by `git ls-tree`. The path won't be found
# in commit_hashes. Use a temporary '0000000' value that will be replaced
# with w/e is found in DEPS later.
submodules[path] = {
'dep_type': 'git',
'url': '{}@{}'.format(module['url'], commit_hashes[module['path']])
'dep_type':
'git',
'url':
'{}@{}'.format(module['url'],
commit_hashes.get(module['path'], '0000000'))
}
if 'gclient-condition' in module:

Loading…
Cancel
Save