diff options
author | Prashanth Swaminathan <prashanthsw@google.com> | 2023-05-27 11:24:16 -0700 |
---|---|---|
committer | libyuv LUCI CQ <libyuv-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-05-30 17:39:51 +0000 |
commit | 564dca8cc525ccd0a5e83f8295c1cf01a1107462 (patch) | |
tree | 99ac92597819075dbb6070ff9aad65f6be50cee8 | |
parent | 4b6373d1897ce38bed4cfbd912831915942147da (diff) | |
download | libyuv-564dca8cc525ccd0a5e83f8295c1cf01a1107462.tar.gz |
Handle DEPS targets that target the HEAD revision
Some targets in DEPS files do not specify a revision and always pull the
HEAD revision instead. In these cases, the URL is not split by '@'.
Handle these cases by assuming HEAD.
Test: Verified local roll attempt does not fail when processing DEPS.
Change-Id: I649195d90933ed58a18d76c20ac7d80ab01c295d
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/4568777
Commit-Queue: Prashanth Swaminathan <prashanthsw@google.com>
Reviewed-by: Mirko Bonadei <mbonadei@chromium.org>
-rwxr-xr-x | tools_libyuv/autoroller/roll_deps.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tools_libyuv/autoroller/roll_deps.py b/tools_libyuv/autoroller/roll_deps.py index 5496e424..4f3811cc 100755 --- a/tools_libyuv/autoroller/roll_deps.py +++ b/tools_libyuv/autoroller/roll_deps.py @@ -218,7 +218,14 @@ def BuildDepsentryDict(deps_dict): else: deps_url = deps_url_spec if not path in result: - url, revision = deps_url.split('@') if deps_url else (None, None) + if not deps_url: + url, revision = None, None + elif '@' not in deps_url: + # Some dependencies always pull in the latest revision and do not have + # a revision in the URL. Assume 'HEAD' in these cases. + url, revision = deps_url, 'HEAD' + else: + url, revision = deps_url.split('@') result[path] = DepsEntry(path, url, revision) AddDepsEntries(deps_dict['deps']) |