30
30
from lpsetup import argparser
31
31
from lpsetup.handlers import (
32
33
handle_directories,
35
from lpsetup.settings import LP_CODE_DIR
36
from lpsetup.settings import (
36
41
from lpsetup.utils import call
77
82
handle_directories,
81
def add_common_arguments(parser):
83
'-c', '--code-dir', default=LP_CODE_DIR,
84
help='The directory of the Launchpad code checkout. '
85
'The directory must reside under the home directory of the '
86
'given user (see -u argument). '
87
'[DEFAULT={0}]'.format(LP_CODE_DIR))
89
86
def add_arguments(self, parser):
90
87
super(SubCommand, self).add_arguments(parser)
91
self.add_common_arguments(parser)
92
88
parser.add_argument(
94
90
help='The name of the system user. '
95
91
'The current user is used if this script is not run as '
96
92
'root and this argument is omitted.')
94
'--checkout-name', default=LP_CHECKOUT_NAME,
95
help='Create a checkout with the given name. '
96
'Ignored if --no-checkout is specified. '
97
'Defaults to {0}.'.format(LP_CHECKOUT_NAME))
99
'-r', '--repository', default=LP_REPOSITORY_DIR,
100
help='The directory of the Launchpad repository to be created. '
101
'The directory must reside under the home directory of the '
102
'given user (see -u argument). '
103
'[DEFAULT={0}]'.format(LP_REPOSITORY_DIR))