|
@@ -214,6 +214,7 @@ group.add_option('--config-name',
|
|
|
help='Always prompt for name/e-mail')
|
|
help='Always prompt for name/e-mail')
|
|
|
|
|
|
|
|
def _GitcInitOptions(init_optparse):
|
|
def _GitcInitOptions(init_optparse):
|
|
|
|
|
+ init_optparse.set_usage("repo gitc-init -u url -c client [options]")
|
|
|
g = init_optparse.add_option_group('GITC options')
|
|
g = init_optparse.add_option_group('GITC options')
|
|
|
g.add_option('-f', '--manifest-file',
|
|
g.add_option('-f', '--manifest-file',
|
|
|
dest='manifest_file',
|
|
dest='manifest_file',
|
|
@@ -272,9 +273,12 @@ def _Init(args, gitc_init=False):
|
|
|
if gitc_init:
|
|
if gitc_init:
|
|
|
gitc_manifest_dir = get_gitc_manifest_dir()
|
|
gitc_manifest_dir = get_gitc_manifest_dir()
|
|
|
if not gitc_manifest_dir:
|
|
if not gitc_manifest_dir:
|
|
|
- _print('error: GITC filesystem is not running. Exiting...',
|
|
|
|
|
|
|
+ _print('fatal: GITC filesystem is not available. Exiting...',
|
|
|
file=sys.stderr)
|
|
file=sys.stderr)
|
|
|
sys.exit(1)
|
|
sys.exit(1)
|
|
|
|
|
+ if not opt.gitc_client:
|
|
|
|
|
+ _print('fatal: GITC client (-c) is required.', file=sys.stderr)
|
|
|
|
|
+ sys.exit(1)
|
|
|
client_dir = os.path.join(gitc_manifest_dir, opt.gitc_client)
|
|
client_dir = os.path.join(gitc_manifest_dir, opt.gitc_client)
|
|
|
if not os.path.exists(client_dir):
|
|
if not os.path.exists(client_dir):
|
|
|
os.makedirs(client_dir)
|
|
os.makedirs(client_dir)
|
|
@@ -681,6 +685,10 @@ def _ParseArguments(args):
|
|
|
|
|
|
|
|
|
|
|
|
|
def _Usage():
|
|
def _Usage():
|
|
|
|
|
+ gitc_usage = ""
|
|
|
|
|
+ if get_gitc_manifest_dir():
|
|
|
|
|
+ gitc_usage = " gitc-init Initialize a GITC Client.\n"
|
|
|
|
|
+
|
|
|
_print(
|
|
_print(
|
|
|
"""usage: repo COMMAND [ARGS]
|
|
"""usage: repo COMMAND [ARGS]
|
|
|
|
|
|
|
@@ -689,7 +697,8 @@ repo is not yet installed. Use "repo init" to install it here.
|
|
|
The most commonly used repo commands are:
|
|
The most commonly used repo commands are:
|
|
|
|
|
|
|
|
init Install repo in the current working directory
|
|
init Install repo in the current working directory
|
|
|
- help Display detailed help on a command
|
|
|
|
|
|
|
+""" + gitc_usage +
|
|
|
|
|
+""" help Display detailed help on a command
|
|
|
|
|
|
|
|
For access to the full online help, install repo ("repo init").
|
|
For access to the full online help, install repo ("repo init").
|
|
|
""", file=sys.stderr)
|
|
""", file=sys.stderr)
|
|
@@ -701,6 +710,10 @@ def _Help(args):
|
|
|
if args[0] == 'init':
|
|
if args[0] == 'init':
|
|
|
init_optparse.print_help()
|
|
init_optparse.print_help()
|
|
|
sys.exit(0)
|
|
sys.exit(0)
|
|
|
|
|
+ elif args[0] == 'gitc-init':
|
|
|
|
|
+ _GitcInitOptions(init_optparse)
|
|
|
|
|
+ init_optparse.print_help()
|
|
|
|
|
+ sys.exit(0)
|
|
|
else:
|
|
else:
|
|
|
_print("error: '%s' is not a bootstrap command.\n"
|
|
_print("error: '%s' is not a bootstrap command.\n"
|
|
|
' For access to online help, install repo ("repo init").'
|
|
' For access to online help, install repo ("repo init").'
|