diff options
author | Raman Tenneti <rtenneti@google.com> | 2021-06-08 10:46:51 -0700 |
---|---|---|
committer | Raman Tenneti <rtenneti@google.com> | 2021-06-08 22:43:32 +0000 |
commit | 50c91ecf4f313a223bc6737d047fc32d665db0fd (patch) | |
tree | f24cce4175b371b9cf6a1d8b677984acda028924 /git_superproject.py | |
parent | 816d82c010e02d3d8deb74f64628e8aab5e1d6b1 (diff) | |
download | git-repo-50c91ecf4f313a223bc6737d047fc32d665db0fd.tar.gz |
superproject: revert not updating commit ids if remote is different.
superproject supports multiple remotes. Get all commit ids
from superproject for all projects that are in the manifest.
$ ./run_tests -v
Bug: [google internal] b/186395810
Change-Id: I6edce3918853a7a3a65aec5528e6a43a544eff53
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/308862
Tested-by: Raman Tenneti <rtenneti@google.com>
Reviewed-by: Jonathan Nieder <jrn@google.com>
Reviewed-by: Mike Frysinger <vapier@google.com>
Diffstat (limited to 'git_superproject.py')
-rw-r--r-- | git_superproject.py | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/git_superproject.py b/git_superproject.py index f7ccd574..dad6a3de 100644 --- a/git_superproject.py +++ b/git_superproject.py | |||
@@ -264,20 +264,10 @@ class Superproject(object): | |||
264 | return None | 264 | return None |
265 | 265 | ||
266 | projects_missing_commit_ids = [] | 266 | projects_missing_commit_ids = [] |
267 | superproject_fetchUrl = self._manifest.superproject['remote'].fetchUrl | ||
268 | for project in projects: | 267 | for project in projects: |
269 | path = project.relpath | 268 | path = project.relpath |
270 | if not path: | 269 | if not path: |
271 | continue | 270 | continue |
272 | # Some manifests that pull projects from the "chromium" GoB | ||
273 | # (remote="chromium"), and have a private manifest that pulls projects | ||
274 | # from both the chromium GoB and "chrome-internal" GoB (remote="chrome"). | ||
275 | # For such projects, one of the remotes will be different from | ||
276 | # superproject's remote. Until superproject, supports multiple remotes, | ||
277 | # don't update the commit ids of remotes that don't match superproject's | ||
278 | # remote. | ||
279 | if project.remote.fetchUrl != superproject_fetchUrl: | ||
280 | continue | ||
281 | commit_id = commit_ids.get(path) | 271 | commit_id = commit_ids.get(path) |
282 | if commit_id: | 272 | if commit_id: |
283 | project.SetRevisionId(commit_id) | 273 | project.SetRevisionId(commit_id) |