diff options
-rw-r--r-- | command.py | 2 | ||||
-rw-r--r-- | project.py | 7 | ||||
-rwxr-xr-x | repo | 3 | ||||
-rw-r--r-- | subcmds/init.py | 7 |
4 files changed, 13 insertions, 6 deletions
@@ -136,7 +136,7 @@ class Command(object): | |||
136 | 136 | ||
137 | groups = mp.config.GetString('manifest.groups') | 137 | groups = mp.config.GetString('manifest.groups') |
138 | if not groups: | 138 | if not groups: |
139 | groups = 'all,-notdefault,platform-' + platform.system().lower() | 139 | groups = 'default,platform-' + platform.system().lower() |
140 | groups = [x for x in re.split(r'[,\s]+', groups) if x] | 140 | groups = [x for x in re.split(r'[,\s]+', groups) if x] |
141 | 141 | ||
142 | if not args: | 142 | if not args: |
@@ -672,9 +672,14 @@ class Project(object): | |||
672 | project_groups: "all,group1,group2" | 672 | project_groups: "all,group1,group2" |
673 | manifest_groups: "-group1,group2" | 673 | manifest_groups: "-group1,group2" |
674 | the project will be matched. | 674 | the project will be matched. |
675 | |||
676 | The special manifest group "default" will match any project that | ||
677 | does not have the special project group "notdefault" | ||
675 | """ | 678 | """ |
676 | expanded_manifest_groups = manifest_groups or ['all', '-notdefault'] | 679 | expanded_manifest_groups = manifest_groups or ['default'] |
677 | expanded_project_groups = ['all'] + (self.groups or []) | 680 | expanded_project_groups = ['all'] + (self.groups or []) |
681 | if not 'notdefault' in expanded_project_groups: | ||
682 | expanded_project_groups += ['default'] | ||
678 | 683 | ||
679 | matched = False | 684 | matched = False |
680 | for group in expanded_manifest_groups: | 685 | for group in expanded_manifest_groups: |
@@ -164,7 +164,8 @@ group.add_option('--depth', type='int', default=None, | |||
164 | help='create a shallow clone with given depth; see git clone') | 164 | help='create a shallow clone with given depth; see git clone') |
165 | group.add_option('-g', '--groups', | 165 | group.add_option('-g', '--groups', |
166 | dest='groups', default='default', | 166 | dest='groups', default='default', |
167 | help='restrict manifest projects to ones with a specified group', | 167 | help='restrict manifest projects to ones with specified ' |
168 | 'group(s) [default|all|G1,G2,G3|G4,-G5,-G6]', | ||
168 | metavar='GROUP') | 169 | metavar='GROUP') |
169 | group.add_option('-p', '--platform', | 170 | group.add_option('-p', '--platform', |
170 | dest='platform', default="auto", | 171 | dest='platform', default="auto", |
diff --git a/subcmds/init.py b/subcmds/init.py index 11312601..29730cc4 100644 --- a/subcmds/init.py +++ b/subcmds/init.py | |||
@@ -91,8 +91,9 @@ to update the working directory files. | |||
91 | dest='depth', | 91 | dest='depth', |
92 | help='create a shallow clone with given depth; see git clone') | 92 | help='create a shallow clone with given depth; see git clone') |
93 | g.add_option('-g', '--groups', | 93 | g.add_option('-g', '--groups', |
94 | dest='groups', default='all,-notdefault', | 94 | dest='groups', default='default', |
95 | help='restrict manifest projects to ones with a specified group', | 95 | help='restrict manifest projects to ones with specified ' |
96 | 'group(s) [default|all|G1,G2,G3|G4,-G5,-G6]', | ||
96 | metavar='GROUP') | 97 | metavar='GROUP') |
97 | g.add_option('-p', '--platform', | 98 | g.add_option('-p', '--platform', |
98 | dest='platform', default='auto', | 99 | dest='platform', default='auto', |
@@ -169,7 +170,7 @@ to update the working directory files. | |||
169 | 170 | ||
170 | groups = [x for x in groups if x] | 171 | groups = [x for x in groups if x] |
171 | groupstr = ','.join(groups) | 172 | groupstr = ','.join(groups) |
172 | if opt.platform == 'auto' and groupstr == 'all,-notdefault,platform-' + platform.system().lower(): | 173 | if opt.platform == 'auto' and groupstr == 'default,platform-' + platform.system().lower(): |
173 | groupstr = None | 174 | groupstr = None |
174 | m.config.SetString('manifest.groups', groupstr) | 175 | m.config.SetString('manifest.groups', groupstr) |
175 | 176 | ||