diff options
| -rw-r--r-- | git_superproject.py | 3 | ||||
| -rw-r--r-- | manifest_xml.py | 6 |
2 files changed, 7 insertions, 2 deletions
diff --git a/git_superproject.py b/git_superproject.py index 4ca84a58..237e57e1 100644 --- a/git_superproject.py +++ b/git_superproject.py | |||
| @@ -32,7 +32,6 @@ from typing import NamedTuple | |||
| 32 | from git_command import git_require, GitCommand | 32 | from git_command import git_require, GitCommand |
| 33 | from git_config import RepoConfig | 33 | from git_config import RepoConfig |
| 34 | from git_refs import R_HEADS | 34 | from git_refs import R_HEADS |
| 35 | from manifest_xml import LOCAL_MANIFEST_GROUP_PREFIX | ||
| 36 | 35 | ||
| 37 | _SUPERPROJECT_GIT_NAME = 'superproject.git' | 36 | _SUPERPROJECT_GIT_NAME = 'superproject.git' |
| 38 | _SUPERPROJECT_MANIFEST_NAME = 'superproject_override.xml' | 37 | _SUPERPROJECT_MANIFEST_NAME = 'superproject_override.xml' |
| @@ -311,7 +310,7 @@ class Superproject(object): | |||
| 311 | if project.revisionId: | 310 | if project.revisionId: |
| 312 | return True | 311 | return True |
| 313 | # Skip the project if it comes from the local manifest. | 312 | # Skip the project if it comes from the local manifest. |
| 314 | return any(s.startswith(LOCAL_MANIFEST_GROUP_PREFIX) for s in project.groups) | 313 | return project.manifest.IsFromLocalManifest(project) |
| 315 | 314 | ||
| 316 | def UpdateProjectsRevisionId(self, projects): | 315 | def UpdateProjectsRevisionId(self, projects): |
| 317 | """Update revisionId of every project in projects with the commit id. | 316 | """Update revisionId of every project in projects with the commit id. |
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 | |||
| 650 | def HasLocalManifests(self): | 650 | def HasLocalManifests(self): |
| 651 | return self._load_local_manifests and self.local_manifests | 651 | return self._load_local_manifests and self.local_manifests |
| 652 | 652 | ||
| 653 | def IsFromLocalManifest(self, project): | ||
| 654 | """Is the project from a local manifest? | ||
| 655 | """ | ||
| 656 | return any(x.startswith(LOCAL_MANIFEST_GROUP_PREFIX) | ||
| 657 | for x in project.groups) | ||
| 658 | |||
| 653 | @property | 659 | @property |
| 654 | def IsMirror(self): | 660 | def IsMirror(self): |
| 655 | return self.manifestProject.config.GetBoolean('repo.mirror') | 661 | return self.manifestProject.config.GetBoolean('repo.mirror') |
