diff options
author | Dan Willemsen <dwillemsen@google.com> | 2015-09-08 13:27:20 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@google.com> | 2015-09-09 12:35:56 -0700 |
commit | 250303b437855c2b50d052a05a08ed517423af8b (patch) | |
tree | ae9df65083e7e0e53d3438adb752cad2dbe27cb5 /manifest_xml.py | |
parent | ba72d8301e33344b3b11e286619c99568c37db1a (diff) | |
download | git-repo-250303b437855c2b50d052a05a08ed517423af8b.tar.gz |
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
Diffstat (limited to 'manifest_xml.py')
-rw-r--r-- | manifest_xml.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/manifest_xml.py b/manifest_xml.py index a7fe8ddf..3ac607ec 100644 --- a/manifest_xml.py +++ b/manifest_xml.py | |||
@@ -167,12 +167,13 @@ class XmlManifest(object): | |||
167 | def _ParseGroups(self, groups): | 167 | def _ParseGroups(self, groups): |
168 | return [x for x in re.split(r'[,\s]+', groups) if x] | 168 | return [x for x in re.split(r'[,\s]+', groups) if x] |
169 | 169 | ||
170 | def Save(self, fd, peg_rev=False, peg_rev_upstream=True): | 170 | def Save(self, fd, peg_rev=False, peg_rev_upstream=True, groups=None): |
171 | """Write the current manifest out to the given file descriptor. | 171 | """Write the current manifest out to the given file descriptor. |
172 | """ | 172 | """ |
173 | mp = self.manifestProject | 173 | mp = self.manifestProject |
174 | 174 | ||
175 | groups = mp.config.GetString('manifest.groups') | 175 | if groups is None: |
176 | groups = mp.config.GetString('manifest.groups') | ||
176 | if groups: | 177 | if groups: |
177 | groups = self._ParseGroups(groups) | 178 | groups = self._ParseGroups(groups) |
178 | 179 | ||