diff --git a/docs/manifest-format.txt b/docs/manifest-format.txt index 9f4585b..a827f55 100644 --- a/docs/manifest-format.txt +++ b/docs/manifest-format.txt @@ -171,7 +171,11 @@ the default element is used. Attribute `groups`: List of groups to which this project belongs, whitespace or comma separated. All projects belong to the group -"default". +"default", and each project automatically belongs to a group of +it's name:`name` and path:`path`. E.g. for +, that project +definition is implicitly in the following manifest groups: +default, name:monkeys, and path:barrel-of. Element annotation ------------------ diff --git a/manifest_xml.py b/manifest_xml.py index a46cf24..86899f6 100644 --- a/manifest_xml.py +++ b/manifest_xml.py @@ -566,8 +566,9 @@ class XmlManifest(object): if node.hasAttribute('groups'): groups = node.getAttribute('groups') groups = [x for x in re.split('[,\s]+', groups) if x] - if 'default' not in groups: - groups.append('default') + + default_groups = ['default', 'name:%s' % name, 'path:%s' % path] + groups.extend(set(default_groups).difference(groups)) if self.IsMirror: relpath = None