Fix incorrect default_groups when parsing projects from XML manifest

Change Details:
* Switch first default group to 'all' instead of 'default'

Change Benefits:
* More consistent with default_groups in the counterpart Save() function
* Fixes bug where command 'repo manifest' added an extra 'default'
  group to every output project element groups attribute. This bug was
  particularly confusing for projects which had 'groups="notdefault"'
  as they were output as 'groups="notdefault,default"' by 'repo manifest'

Change-Id: I5611c027a982d3394899466248b971910bec8c6b
This commit is contained in:
David Holmer 2012-09-26 01:58:48 -04:00
parent cf76b1bcec
commit 9779565abf

View File

@ -579,7 +579,7 @@ class XmlManifest(object):
groups = node.getAttribute('groups') groups = node.getAttribute('groups')
groups = [x for x in re.split('[,\s]+', groups) if x] groups = [x for x in re.split('[,\s]+', groups) if x]
default_groups = ['default', 'name:%s' % name, 'path:%s' % path] default_groups = ['all', 'name:%s' % name, 'path:%s' % path]
groups.extend(set(default_groups).difference(groups)) groups.extend(set(default_groups).difference(groups))
if self.IsMirror: if self.IsMirror: