diff options
author | Conley Owens <cco3@android.com> | 2012-08-13 13:11:18 -0700 |
---|---|---|
committer | gerrit code review <noreply-gerritcodereview@google.com> | 2012-09-05 11:46:48 -0700 |
commit | bb1b5f5f863fca0e85764f5b35c117f5724d15c0 (patch) | |
tree | 0b6b8d0d6d027f2d0e0dd6fabdd4eafc6c919026 /subcmds | |
parent | e2126652a3a1e08724a54091793bb29a79d31014 (diff) | |
download | git-repo-bb1b5f5f863fca0e85764f5b35c117f5724d15c0.tar.gz |
Allow projects to be specified as notdefault
Instead of every group being in the group "default", every project
is now in the group "all". A group that should not be downloaded
by default may be added to the group "notdefault".
This allows all group names to be positive (instead of removing groups
directly in the manifest with -default) and offers a clear way of
selecting every project (--groups all).
Change-Id: I99cd70309adb1f8460db3bbc6eff46bdcd22256f
Diffstat (limited to 'subcmds')
-rw-r--r-- | subcmds/init.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/subcmds/init.py b/subcmds/init.py index b16f57c4..9a4f7118 100644 --- a/subcmds/init.py +++ b/subcmds/init.py | |||
@@ -90,12 +90,12 @@ to update the working directory files. | |||
90 | dest='depth', | 90 | dest='depth', |
91 | help='create a shallow clone with given depth; see git clone') | 91 | help='create a shallow clone with given depth; see git clone') |
92 | g.add_option('-g', '--groups', | 92 | g.add_option('-g', '--groups', |
93 | dest='groups', default='default', | 93 | dest='groups', default='all,-notdefault', |
94 | help='restrict manifest projects to ones with a specified group', | 94 | help='restrict manifest projects to ones with a specified group', |
95 | metavar='GROUP') | 95 | metavar='GROUP') |
96 | g.add_option('-p', '--platform', | 96 | g.add_option('-p', '--platform', |
97 | dest='platform', default='auto', | 97 | dest='platform', default='auto', |
98 | help='restrict manifest projects to ones with a specified' | 98 | help='restrict manifest projects to ones with a specified ' |
99 | 'platform group [auto|all|none|linux|darwin|...]', | 99 | 'platform group [auto|all|none|linux|darwin|...]', |
100 | metavar='PLATFORM') | 100 | metavar='PLATFORM') |
101 | 101 | ||
@@ -164,7 +164,7 @@ to update the working directory files. | |||
164 | 164 | ||
165 | groups = [x for x in groups if x] | 165 | groups = [x for x in groups if x] |
166 | groupstr = ','.join(groups) | 166 | groupstr = ','.join(groups) |
167 | if opt.platform == 'auto' and groupstr == 'default,platform-' + platform.system().lower(): | 167 | if opt.platform == 'auto' and groupstr == 'all,-notdefault,platform-' + platform.system().lower(): |
168 | groupstr = None | 168 | groupstr = None |
169 | m.config.SetString('manifest.groups', groupstr) | 169 | m.config.SetString('manifest.groups', groupstr) |
170 | 170 | ||