From 0a1c6a1c16e2c89f98158cb2f79dda1583a8fac4 Mon Sep 17 00:00:00 2001 From: David Holmer Date: Wed, 14 Nov 2012 19:19:00 -0500 Subject: 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 --- subcmds/init.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'subcmds/init.py') 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. dest='depth', help='create a shallow clone with given depth; see git clone') g.add_option('-g', '--groups', - dest='groups', default='all,-notdefault', - help='restrict manifest projects to ones with a specified group', + dest='groups', default='default', + help='restrict manifest projects to ones with specified ' + 'group(s) [default|all|G1,G2,G3|G4,-G5,-G6]', metavar='GROUP') g.add_option('-p', '--platform', dest='platform', default='auto', @@ -169,7 +170,7 @@ to update the working directory files. groups = [x for x in groups if x] groupstr = ','.join(groups) - if opt.platform == 'auto' and groupstr == 'all,-notdefault,platform-' + platform.system().lower(): + if opt.platform == 'auto' and groupstr == 'default,platform-' + platform.system().lower(): groupstr = None m.config.SetString('manifest.groups', groupstr) -- cgit v1.2.3-54-g00ecf