mirror of
https://gerrit.googlesource.com/git-repo
synced 2026-01-11 17:10:33 +00:00
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>
This commit is contained in:
@@ -399,7 +399,7 @@ class Command:
|
||||
result = []
|
||||
|
||||
if not groups:
|
||||
groups = manifest.GetGroupsStr()
|
||||
groups = manifest.GetManifestGroupsStr()
|
||||
groups = [x for x in re.split(r"[,\s]+", groups) if x]
|
||||
|
||||
if not args:
|
||||
|
||||
@@ -422,7 +422,8 @@ class Superproject:
|
||||
)
|
||||
return None
|
||||
manifest_str = self._manifest.ToXml(
|
||||
filter_groups=self._manifest.GetGroupsStr(), omit_local=True
|
||||
filter_groups=self._manifest.GetManifestGroupsStr(),
|
||||
omit_local=True,
|
||||
).toxml()
|
||||
manifest_path = self._manifest_path
|
||||
try:
|
||||
|
||||
@@ -1122,7 +1122,7 @@ https://gerrit.googlesource.com/git-repo/+/HEAD/docs/manifest-format.md
|
||||
groups += f",platform-{platform.system().lower()}"
|
||||
return groups
|
||||
|
||||
def GetGroupsStr(self):
|
||||
def GetManifestGroupsStr(self):
|
||||
"""Returns the manifest group string that should be synced."""
|
||||
return (
|
||||
self.manifestProject.manifest_groups or self.GetDefaultGroupsStr()
|
||||
|
||||
@@ -88,7 +88,7 @@ class Info(PagedCommand):
|
||||
self.manifest = self.manifest.outer_client
|
||||
manifestConfig = self.manifest.manifestProject.config
|
||||
mergeBranch = manifestConfig.GetBranch("default").merge
|
||||
manifestGroups = self.manifest.GetGroupsStr()
|
||||
manifestGroups = self.manifest.GetManifestGroupsStr()
|
||||
|
||||
self.heading("Manifest branch: ")
|
||||
if self.manifest.default.revisionExpr:
|
||||
|
||||
@@ -639,10 +639,10 @@ class ProjectElementTests(ManifestParseTestCase):
|
||||
{"g1", "g2", "name:extras", "all", "path:path"},
|
||||
)
|
||||
groupstr = "default,platform-" + platform.system().lower()
|
||||
self.assertEqual(groupstr, manifest.GetGroupsStr())
|
||||
self.assertEqual(groupstr, manifest.GetManifestGroupsStr())
|
||||
groupstr = "g1,g2,g1"
|
||||
manifest.manifestProject.config.SetString("manifest.groups", groupstr)
|
||||
self.assertEqual(groupstr, manifest.GetGroupsStr())
|
||||
self.assertEqual(groupstr, manifest.GetManifestGroupsStr())
|
||||
|
||||
def test_set_revision_id(self):
|
||||
"""Check setting of project's revisionId."""
|
||||
|
||||
Reference in New Issue
Block a user