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: I435235cb5622a048ffad0059affd32ecf71f1f5b
This commit is contained in:
Dan Willemsen
2015-09-08 13:27:20 -07:00
parent 5cc384034d
commit 5ea32d1359
5 changed files with 104 additions and 36 deletions

View File

@ -167,12 +167,13 @@ class XmlManifest(object):
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)