summaryrefslogtreecommitdiffstats
path: root/manifest_xml.py
diff options
context:
space:
mode:
authorLaMont Jones <lamontjones@google.com>2022-02-25 17:05:21 +0000
committerLaMont Jones <lamontjones@google.com>2022-02-28 20:08:58 +0000
commitb308db1e2a982ae4158cb6fedd23d3d547bd09b0 (patch)
tree01cf56da1875f742489499096430b7b2f45cc3b1 /manifest_xml.py
parentcc879a97c3e2614d19b15b4661c3cab4d33139c9 (diff)
downloadgit-repo-b308db1e2a982ae4158cb6fedd23d3d547bd09b0.tar.gz
manifest_xml: group for submanifest projects
Add all projects in a submanifest to the group submanifest::<path_prefix> for ease in filtering. Change-Id: Ia6f01f9445f4f8d20fda3402f4d5821c43ceaf7f Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/331319 Tested-by: LaMont Jones <lamontjones@google.com> Reviewed-by: Mike Frysinger <vapier@google.com>
Diffstat (limited to 'manifest_xml.py')
-rw-r--r--manifest_xml.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/manifest_xml.py b/manifest_xml.py
index 7a4eb1e8..fa3e1034 100644
--- a/manifest_xml.py
+++ b/manifest_xml.py
@@ -36,6 +36,8 @@ LOCAL_MANIFESTS_DIR_NAME = 'local_manifests'
36SUBMANIFEST_DIR = 'submanifests' 36SUBMANIFEST_DIR = 'submanifests'
37# Limit submanifests to an arbitrary depth for loop detection. 37# Limit submanifests to an arbitrary depth for loop detection.
38MAX_SUBMANIFEST_DEPTH = 8 38MAX_SUBMANIFEST_DEPTH = 8
39# Add all projects from sub manifest into a group.
40SUBMANIFEST_GROUP_PREFIX = 'submanifest:'
39 41
40# Add all projects from local manifest into a group. 42# Add all projects from local manifest into a group.
41LOCAL_MANIFEST_GROUP_PREFIX = 'local:' 43LOCAL_MANIFEST_GROUP_PREFIX = 'local:'
@@ -990,6 +992,8 @@ https://gerrit.googlesource.com/git-repo/+/HEAD/docs/manifest-format.md
990 self.branch = b 992 self.branch = b
991 993
992 parent_groups = self.parent_groups 994 parent_groups = self.parent_groups
995 if self.path_prefix:
996 parent_groups = f'{SUBMANIFEST_GROUP_PREFIX}:path:{self.path_prefix},{parent_groups}'
993 997
994 # The manifestFile was specified by the user which is why we allow include 998 # The manifestFile was specified by the user which is why we allow include
995 # paths to point anywhere. 999 # paths to point anywhere.