From 87cce68b28c34fa86895baa8d7f48307382e6c75 Mon Sep 17 00:00:00 2001 From: LaMont Jones Date: Mon, 14 Feb 2022 17:48:31 +0000 Subject: Move local-manifest check to manifest_xml.py This removes the need for git_superproject to include manifest_xml, and puts the logic for local_manifest detection in one place. Change-Id: I4d33ded0542ceea4606a1ea24304f678de20c59e Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/330499 Tested-by: LaMont Jones Reviewed-by: Raman Tenneti --- manifest_xml.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'manifest_xml.py') diff --git a/manifest_xml.py b/manifest_xml.py index daf85d30..7c5906da 100644 --- a/manifest_xml.py +++ b/manifest_xml.py @@ -650,6 +650,12 @@ https://gerrit.googlesource.com/git-repo/+/HEAD/docs/manifest-format.md def HasLocalManifests(self): return self._load_local_manifests and self.local_manifests + def IsFromLocalManifest(self, project): + """Is the project from a local manifest? + """ + return any(x.startswith(LOCAL_MANIFEST_GROUP_PREFIX) + for x in project.groups) + @property def IsMirror(self): return self.manifestProject.config.GetBoolean('repo.mirror') -- cgit v1.2.3-54-g00ecf