Special handling for manifest group "default"
Change Details:
* Make "default" a special manifest group that matches any project that
does not have the special project group "notdefault"
* Use "default" instead of "all,-notdefault" when user does not specify
manifest group
* Expand -g option help to include example usage of manifest groups
Change Benefits:
* Allow a more intuitive and expressive manifest groups specification:
* "default" instead of "all,-notdefault"
* "default,foo" instead of "all,-notdefault,foo"
* "default,-foo" instead of "all,-notdefault,-foo"
* "foo,-default" which has no equivalent
* Default manifest groups behavior can be restored by the command
'repo init -g default'. This is significantly more intuitive than the
current equivalent command 'repo init -g all,-notdefault'.
Change-Id: I6d0673791d64a650110a917c248bcebb23b279d3
diff --git a/project.py b/project.py
index 22e4a5d..901a283 100644
--- a/project.py
+++ b/project.py
@@ -672,9 +672,14 @@
project_groups: "all,group1,group2"
manifest_groups: "-group1,group2"
the project will be matched.
+
+ The special manifest group "default" will match any project that
+ does not have the special project group "notdefault"
"""
- expanded_manifest_groups = manifest_groups or ['all', '-notdefault']
+ expanded_manifest_groups = manifest_groups or ['default']
expanded_project_groups = ['all'] + (self.groups or [])
+ if not 'notdefault' in expanded_project_groups:
+ expanded_project_groups += ['default']
matched = False
for group in expanded_manifest_groups: