GITC: Always update the gitc manifest from the repo manifest
This way any changes made to the main manifest are reflected in the gitc
manifest. It's also necessary to use both manifests to sync since the
information required to update the gitc manifest is actually in the repo
manifest.
This also fixes a few issues that came up when testing. notdefault
groups weren't being saved to the gitc manifest in a method that matched
'sync'. The merge branch wasn't always being set to the correct value
either.
Change-Id: I5dbc850dd73a9fbd10ab2470ae4c40e46ff894de
diff --git a/manifest_xml.py b/manifest_xml.py
index a7fe8dd..3ac607e 100644
--- a/manifest_xml.py
+++ b/manifest_xml.py
@@ -167,12 +167,13 @@
def _ParseGroups(self, groups):
return [x for x in re.split(r'[,\s]+', groups) if x]
- def Save(self, fd, peg_rev=False, peg_rev_upstream=True):
+ def Save(self, fd, peg_rev=False, peg_rev_upstream=True, groups=None):
"""Write the current manifest out to the given file descriptor.
"""
mp = self.manifestProject
- groups = mp.config.GetString('manifest.groups')
+ if groups is None:
+ groups = mp.config.GetString('manifest.groups')
if groups:
groups = self._ParseGroups(groups)