diff options
author | Raman Tenneti <rtenneti@google.com> | 2021-05-02 19:47:29 -0700 |
---|---|---|
committer | Raman Tenneti <rtenneti@google.com> | 2021-05-03 05:13:23 +0000 |
commit | feb28914bd17aacc2d251516e504a33f991f86c4 (patch) | |
tree | 66865f9cb25d6134acb02e63502636c366a963cd /manifest_xml.py | |
parent | d1f3e149df4482ee24feee038c88df32fbc77380 (diff) | |
download | git-repo-feb28914bd17aacc2d251516e504a33f991f86c4.tar.gz |
superproject: Don't update the commit ids of projects if remote is different.
1) Skip setting the revision id (commit id) for the projects whose
remote doesn't match superproject's remote.
2) exp-superproject/superproject_override.xml includes local_manfiest's
projects. When we load this XML, don't reload projects from local.xml
(otherwise we will get duplicate projects errors).
Tested the code with the following commands.
$ ./run_tests -v
+ Test with local.xml
$ repo_dev init -u sso://android.git.corp.google.com/platform/manifest -b master --use-superproject --partial-clone --clone-filter=blob:limit=10M && mkdir -p .repo/local_manifests && (gcertstatus -quiet=true || gcert) && ln -s /google/src/head/depot/google3/wireless/android/build_tools/aosp/manifests/mirror-aosp-master-with-vendor/local.xml .repo/local_manifests/local.xml
$ repo_dev sync -c -j8
+ Test without local.xml
$ repo_dev init -u sso://android.git.corp.google.com/platform/manifest -b master --partial-clone --clone-filter=blob:limit=10M --repo-rev=main --use-superproject
$ repo_dev sync -c -j8
Bug: [google internal] b/186395810
Change-Id: I4e9d4ac2d94a9fc0cef0ccd787b6310758009e86
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/304882
Tested-by: Raman Tenneti <rtenneti@google.com>
Reviewed-by: Mike Frysinger <vapier@google.com>
Diffstat (limited to 'manifest_xml.py')
-rw-r--r-- | manifest_xml.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/manifest_xml.py b/manifest_xml.py index 64b7fb4e..73556a5e 100644 --- a/manifest_xml.py +++ b/manifest_xml.py | |||
@@ -596,6 +596,10 @@ https://gerrit.googlesource.com/git-repo/+/HEAD/docs/manifest-format.md | |||
596 | return set(x.strip() for x in exclude.split(',')) | 596 | return set(x.strip() for x in exclude.split(',')) |
597 | 597 | ||
598 | @property | 598 | @property |
599 | def HasLocalManifests(self): | ||
600 | return self._load_local_manifests and self.local_manifests | ||
601 | |||
602 | @property | ||
599 | def IsMirror(self): | 603 | def IsMirror(self): |
600 | return self.manifestProject.config.GetBoolean('repo.mirror') | 604 | return self.manifestProject.config.GetBoolean('repo.mirror') |
601 | 605 | ||