diff options
| author | Peter Kjellerstedt <pkj@axis.com> | 2025-11-18 20:05:57 +0100 |
|---|---|---|
| committer | LUCI <gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2025-12-02 11:44:24 -0800 |
| commit | 91ec998598be569b1f167cc8776b58f9540b639a (patch) | |
| tree | 21e8a13197725ea123cbe2f7ab6a2acf9ba734f7 | |
| parent | 08964a16589efd16db7beaa845bc11ec6d89f94c (diff) | |
| download | git-repo-91ec998598be569b1f167cc8776b58f9540b639a.tar.gz | |
manifest_xml, git_superproject: Rename an argument for XmlManifest.ToXml()
Rename the groups argument to filter_groups to make it more clear what
kind of groups it refers to.
Change-Id: I90e6e9aa74a7e3e697705dd4bf8676226055878b
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/528461
Reviewed-by: Mike Frysinger <vapier@google.com>
Commit-Queue: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Tested-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
| -rw-r--r-- | git_superproject.py | 2 | ||||
| -rw-r--r-- | manifest_xml.py | 18 |
2 files changed, 10 insertions, 10 deletions
diff --git a/git_superproject.py b/git_superproject.py index 2ef6df16c..14ba1547e 100644 --- a/git_superproject.py +++ b/git_superproject.py | |||
| @@ -422,7 +422,7 @@ class Superproject: | |||
| 422 | ) | 422 | ) |
| 423 | return None | 423 | return None |
| 424 | manifest_str = self._manifest.ToXml( | 424 | manifest_str = self._manifest.ToXml( |
| 425 | groups=self._manifest.GetGroupsStr(), omit_local=True | 425 | filter_groups=self._manifest.GetGroupsStr(), omit_local=True |
| 426 | ).toxml() | 426 | ).toxml() |
| 427 | manifest_path = self._manifest_path | 427 | manifest_path = self._manifest_path |
| 428 | try: | 428 | try: |
diff --git a/manifest_xml.py b/manifest_xml.py index 0e899e5ab..30b806e3c 100644 --- a/manifest_xml.py +++ b/manifest_xml.py | |||
| @@ -579,16 +579,16 @@ https://gerrit.googlesource.com/git-repo/+/HEAD/docs/manifest-format.md | |||
| 579 | peg_rev=False, | 579 | peg_rev=False, |
| 580 | peg_rev_upstream=True, | 580 | peg_rev_upstream=True, |
| 581 | peg_rev_dest_branch=True, | 581 | peg_rev_dest_branch=True, |
| 582 | groups=None, | 582 | filter_groups=None, |
| 583 | omit_local=False, | 583 | omit_local=False, |
| 584 | ): | 584 | ): |
| 585 | """Return the current manifest XML.""" | 585 | """Return the current manifest XML.""" |
| 586 | mp = self.manifestProject | 586 | mp = self.manifestProject |
| 587 | 587 | ||
| 588 | if groups is None: | 588 | if filter_groups is None: |
| 589 | groups = mp.manifest_groups | 589 | filter_groups = mp.manifest_groups |
| 590 | if groups: | 590 | if filter_groups: |
| 591 | groups = self._ParseList(groups) | 591 | filter_groups = self._ParseList(filter_groups) |
| 592 | 592 | ||
| 593 | doc = xml.dom.minidom.Document() | 593 | doc = xml.dom.minidom.Document() |
| 594 | root = doc.createElement("manifest") | 594 | root = doc.createElement("manifest") |
| @@ -661,7 +661,7 @@ https://gerrit.googlesource.com/git-repo/+/HEAD/docs/manifest-format.md | |||
| 661 | output_project(parent, parent_node, project) | 661 | output_project(parent, parent_node, project) |
| 662 | 662 | ||
| 663 | def output_project(parent, parent_node, p): | 663 | def output_project(parent, parent_node, p): |
| 664 | if not p.MatchesGroups(groups): | 664 | if not p.MatchesGroups(filter_groups): |
| 665 | return | 665 | return |
| 666 | 666 | ||
| 667 | if omit_local and self.IsFromLocalManifest(p): | 667 | if omit_local and self.IsFromLocalManifest(p): |
| @@ -732,9 +732,9 @@ https://gerrit.googlesource.com/git-repo/+/HEAD/docs/manifest-format.md | |||
| 732 | le.setAttribute("dest", lf.dest) | 732 | le.setAttribute("dest", lf.dest) |
| 733 | e.appendChild(le) | 733 | e.appendChild(le) |
| 734 | 734 | ||
| 735 | egroups = p.groups - {"all", f"name:{p.name}", f"path:{p.relpath}"} | 735 | groups = p.groups - {"all", f"name:{p.name}", f"path:{p.relpath}"} |
| 736 | if egroups: | 736 | if groups: |
| 737 | e.setAttribute("groups", ",".join(sorted(egroups))) | 737 | e.setAttribute("groups", ",".join(sorted(groups))) |
| 738 | 738 | ||
| 739 | for a in p.annotations: | 739 | for a in p.annotations: |
| 740 | if a.keep == "true": | 740 | if a.keep == "true": |
