summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Kjellerstedt <pkj@axis.com>2025-11-18 20:13:03 +0100
committerLUCI <gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com>2025-12-03 07:57:22 -0800
commit2b6de52a36d5d38c7b9a92d7f61e1f0daf4dec69 (patch)
tree33db8a429b972f1fb8fa8f82d1bce2a62bdec8e2
parent91ec998598be569b1f167cc8776b58f9540b639a (diff)
downloadgit-repo-2b6de52a36d5d38c7b9a92d7f61e1f0daf4dec69.tar.gz
Rename XmlManifest.GetGroupsStr() to XmlManifest.GetManifestGroupsStr()
This makes it more clear what kind of groups it refers to. Change-Id: I47369050d1436efcc77f3a69d5b7c99a536b23bc Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/528462 Tested-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Reviewed-by: Gavin Mak <gavinmak@google.com> Commit-Queue: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Reviewed-by: Mike Frysinger <vapier@google.com>
-rw-r--r--command.py2
-rw-r--r--git_superproject.py3
-rw-r--r--manifest_xml.py2
-rw-r--r--subcmds/info.py2
-rw-r--r--tests/test_manifest_xml.py4
5 files changed, 7 insertions, 6 deletions
diff --git a/command.py b/command.py
index c32a095cf..e74a94fa3 100644
--- a/command.py
+++ b/command.py
@@ -399,7 +399,7 @@ class Command:
399 result = [] 399 result = []
400 400
401 if not groups: 401 if not groups:
402 groups = manifest.GetGroupsStr() 402 groups = manifest.GetManifestGroupsStr()
403 groups = [x for x in re.split(r"[,\s]+", groups) if x] 403 groups = [x for x in re.split(r"[,\s]+", groups) if x]
404 404
405 if not args: 405 if not args:
diff --git a/git_superproject.py b/git_superproject.py
index 14ba1547e..1ada173b7 100644
--- a/git_superproject.py
+++ b/git_superproject.py
@@ -422,7 +422,8 @@ class Superproject:
422 ) 422 )
423 return None 423 return None
424 manifest_str = self._manifest.ToXml( 424 manifest_str = self._manifest.ToXml(
425 filter_groups=self._manifest.GetGroupsStr(), omit_local=True 425 filter_groups=self._manifest.GetManifestGroupsStr(),
426 omit_local=True,
426 ).toxml() 427 ).toxml()
427 manifest_path = self._manifest_path 428 manifest_path = self._manifest_path
428 try: 429 try:
diff --git a/manifest_xml.py b/manifest_xml.py
index 30b806e3c..7987061d6 100644
--- a/manifest_xml.py
+++ b/manifest_xml.py
@@ -1122,7 +1122,7 @@ https://gerrit.googlesource.com/git-repo/+/HEAD/docs/manifest-format.md
1122 groups += f",platform-{platform.system().lower()}" 1122 groups += f",platform-{platform.system().lower()}"
1123 return groups 1123 return groups
1124 1124
1125 def GetGroupsStr(self): 1125 def GetManifestGroupsStr(self):
1126 """Returns the manifest group string that should be synced.""" 1126 """Returns the manifest group string that should be synced."""
1127 return ( 1127 return (
1128 self.manifestProject.manifest_groups or self.GetDefaultGroupsStr() 1128 self.manifestProject.manifest_groups or self.GetDefaultGroupsStr()
diff --git a/subcmds/info.py b/subcmds/info.py
index 2fbdae057..c5291cf2e 100644
--- a/subcmds/info.py
+++ b/subcmds/info.py
@@ -88,7 +88,7 @@ class Info(PagedCommand):
88 self.manifest = self.manifest.outer_client 88 self.manifest = self.manifest.outer_client
89 manifestConfig = self.manifest.manifestProject.config 89 manifestConfig = self.manifest.manifestProject.config
90 mergeBranch = manifestConfig.GetBranch("default").merge 90 mergeBranch = manifestConfig.GetBranch("default").merge
91 manifestGroups = self.manifest.GetGroupsStr() 91 manifestGroups = self.manifest.GetManifestGroupsStr()
92 92
93 self.heading("Manifest branch: ") 93 self.heading("Manifest branch: ")
94 if self.manifest.default.revisionExpr: 94 if self.manifest.default.revisionExpr:
diff --git a/tests/test_manifest_xml.py b/tests/test_manifest_xml.py
index 0cd84f081..039921f65 100644
--- a/tests/test_manifest_xml.py
+++ b/tests/test_manifest_xml.py
@@ -639,10 +639,10 @@ class ProjectElementTests(ManifestParseTestCase):
639 {"g1", "g2", "name:extras", "all", "path:path"}, 639 {"g1", "g2", "name:extras", "all", "path:path"},
640 ) 640 )
641 groupstr = "default,platform-" + platform.system().lower() 641 groupstr = "default,platform-" + platform.system().lower()
642 self.assertEqual(groupstr, manifest.GetGroupsStr()) 642 self.assertEqual(groupstr, manifest.GetManifestGroupsStr())
643 groupstr = "g1,g2,g1" 643 groupstr = "g1,g2,g1"
644 manifest.manifestProject.config.SetString("manifest.groups", groupstr) 644 manifest.manifestProject.config.SetString("manifest.groups", groupstr)
645 self.assertEqual(groupstr, manifest.GetGroupsStr()) 645 self.assertEqual(groupstr, manifest.GetManifestGroupsStr())
646 646
647 def test_set_revision_id(self): 647 def test_set_revision_id(self):
648 """Check setting of project's revisionId.""" 648 """Check setting of project's revisionId."""