Skip to content

Commit 2b6de52

Browse files
Peter KjellerstedtLUCI
authored andcommitted
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 <[email protected]> Reviewed-by: Gavin Mak <[email protected]> Commit-Queue: Peter Kjellerstedt <[email protected]> Reviewed-by: Mike Frysinger <[email protected]>
1 parent 91ec998 commit 2b6de52

File tree

5 files changed

+7
-6
lines changed

5 files changed

+7
-6
lines changed

command.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ def GetProjects(
399399
result = []
400400

401401
if not groups:
402-
groups = manifest.GetGroupsStr()
402+
groups = manifest.GetManifestGroupsStr()
403403
groups = [x for x in re.split(r"[,\s]+", groups) if x]
404404

405405
if not args:

git_superproject.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,8 @@ def _WriteManifestFile(self):
422422
)
423423
return None
424424
manifest_str = self._manifest.ToXml(
425-
filter_groups=self._manifest.GetGroupsStr(), omit_local=True
425+
filter_groups=self._manifest.GetManifestGroupsStr(),
426+
omit_local=True,
426427
).toxml()
427428
manifest_path = self._manifest_path
428429
try:

manifest_xml.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1122,7 +1122,7 @@ def GetDefaultGroupsStr(self, with_platform=True):
11221122
groups += f",platform-{platform.system().lower()}"
11231123
return groups
11241124

1125-
def GetGroupsStr(self):
1125+
def GetManifestGroupsStr(self):
11261126
"""Returns the manifest group string that should be synced."""
11271127
return (
11281128
self.manifestProject.manifest_groups or self.GetDefaultGroupsStr()

subcmds/info.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def Execute(self, opt, args):
8888
self.manifest = self.manifest.outer_client
8989
manifestConfig = self.manifest.manifestProject.config
9090
mergeBranch = manifestConfig.GetBranch("default").merge
91-
manifestGroups = self.manifest.GetGroupsStr()
91+
manifestGroups = self.manifest.GetManifestGroupsStr()
9292

9393
self.heading("Manifest branch: ")
9494
if self.manifest.default.revisionExpr:

tests/test_manifest_xml.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -639,10 +639,10 @@ def test_group(self):
639639
{"g1", "g2", "name:extras", "all", "path:path"},
640640
)
641641
groupstr = "default,platform-" + platform.system().lower()
642-
self.assertEqual(groupstr, manifest.GetGroupsStr())
642+
self.assertEqual(groupstr, manifest.GetManifestGroupsStr())
643643
groupstr = "g1,g2,g1"
644644
manifest.manifestProject.config.SetString("manifest.groups", groupstr)
645-
self.assertEqual(groupstr, manifest.GetGroupsStr())
645+
self.assertEqual(groupstr, manifest.GetManifestGroupsStr())
646646

647647
def test_set_revision_id(self):
648648
"""Check setting of project's revisionId."""

0 commit comments

Comments
 (0)