summaryrefslogtreecommitdiffstats
path: root/manifest_xml.py
diff options
context:
space:
mode:
authorBrian Harring <ferringb@chromium.org>2012-06-15 02:24:20 -0700
committerShawn O. Pearce <sop@google.com>2012-07-31 22:05:44 -0700
commit7da1314e38a2bb2941511c9003fa388eddb55c0a (patch)
tree21eb19cb1edb13fc0931fbef074d3dd36e5dc7ba /manifest_xml.py
parent435370c6f0e202378ae233cf1088e499ba07e971 (diff)
downloadgit-repo-7da1314e38a2bb2941511c9003fa388eddb55c0a.tar.gz
Inject the project name into each projects groups.
For CrOS, we have scenarios were people checkout a smaller version of our manifest via groups, and enable individual repositories as needed for their work. Previously this was via local_manifest manipulation, which breaks via manifest-groups would require a remove-project tag. Via injecting the projects name into the projects groups, this allows us to instead manipulate the configured groups allowing the user to turn on/off projects as necessary. Change-Id: I07b7918e16cc9dc28eb47e19a46a04dc4fd0be74
Diffstat (limited to 'manifest_xml.py')
-rw-r--r--manifest_xml.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/manifest_xml.py b/manifest_xml.py
index a46cf24e..86899f63 100644
--- a/manifest_xml.py
+++ b/manifest_xml.py
@@ -566,8 +566,9 @@ class XmlManifest(object):
566 if node.hasAttribute('groups'): 566 if node.hasAttribute('groups'):
567 groups = node.getAttribute('groups') 567 groups = node.getAttribute('groups')
568 groups = [x for x in re.split('[,\s]+', groups) if x] 568 groups = [x for x in re.split('[,\s]+', groups) if x]
569 if 'default' not in groups: 569
570 groups.append('default') 570 default_groups = ['default', 'name:%s' % name, 'path:%s' % path]
571 groups.extend(set(default_groups).difference(groups))
571 572
572 if self.IsMirror: 573 if self.IsMirror:
573 relpath = None 574 relpath = None