diff options
Diffstat (limited to 'subcmds/init.py')
-rw-r--r-- | subcmds/init.py | 103 |
1 files changed, 1 insertions, 102 deletions
diff --git a/subcmds/init.py b/subcmds/init.py index f16bee6d..3566b8b6 100644 --- a/subcmds/init.py +++ b/subcmds/init.py | |||
@@ -80,108 +80,7 @@ to update the working directory files. | |||
80 | """ | 80 | """ |
81 | 81 | ||
82 | def _Options(self, p, gitc_init=False): | 82 | def _Options(self, p, gitc_init=False): |
83 | # Logging | 83 | Wrapper().InitParser(p, gitc_init=gitc_init) |
84 | g = p.add_option_group('Logging options') | ||
85 | g.add_option('-v', '--verbose', | ||
86 | dest='output_mode', action='store_true', | ||
87 | help='show all output') | ||
88 | g.add_option('-q', '--quiet', | ||
89 | dest='output_mode', action='store_false', | ||
90 | help='only show errors') | ||
91 | |||
92 | # Manifest | ||
93 | g = p.add_option_group('Manifest options') | ||
94 | g.add_option('-u', '--manifest-url', | ||
95 | dest='manifest_url', | ||
96 | help='manifest repository location', metavar='URL') | ||
97 | g.add_option('-b', '--manifest-branch', metavar='REVISION', | ||
98 | help='manifest branch or revision (use HEAD for default)') | ||
99 | cbr_opts = ['--current-branch'] | ||
100 | # The gitc-init subcommand allocates -c itself, but a lot of init users | ||
101 | # want -c, so try to satisfy both as best we can. | ||
102 | if not gitc_init: | ||
103 | cbr_opts += ['-c'] | ||
104 | g.add_option(*cbr_opts, | ||
105 | dest='current_branch_only', action='store_true', | ||
106 | help='fetch only current manifest branch from server') | ||
107 | g.add_option('-m', '--manifest-name', | ||
108 | dest='manifest_name', default='default.xml', | ||
109 | help='initial manifest file', metavar='NAME.xml') | ||
110 | g.add_option('--mirror', | ||
111 | dest='mirror', action='store_true', | ||
112 | help='create a replica of the remote repositories ' | ||
113 | 'rather than a client working directory') | ||
114 | g.add_option('--reference', | ||
115 | dest='reference', | ||
116 | help='location of mirror directory', metavar='DIR') | ||
117 | g.add_option('--dissociate', | ||
118 | dest='dissociate', action='store_true', | ||
119 | help='dissociate from reference mirrors after clone') | ||
120 | g.add_option('--depth', type='int', default=None, | ||
121 | dest='depth', | ||
122 | help='create a shallow clone with given depth; see git clone') | ||
123 | g.add_option('--partial-clone', action='store_true', | ||
124 | dest='partial_clone', | ||
125 | help='perform partial clone (https://git-scm.com/' | ||
126 | 'docs/gitrepository-layout#_code_partialclone_code)') | ||
127 | g.add_option('--no-partial-clone', action='store_false', | ||
128 | dest='partial_clone', | ||
129 | help='disable use of partial clone (https://git-scm.com/' | ||
130 | 'docs/gitrepository-layout#_code_partialclone_code)') | ||
131 | g.add_option('--clone-filter', action='store', default='blob:none', | ||
132 | dest='clone_filter', | ||
133 | help='filter for use with --partial-clone [default: %default]') | ||
134 | g.add_option('--worktree', action='store_true', | ||
135 | help='use git-worktree to manage projects') | ||
136 | g.add_option('--archive', | ||
137 | dest='archive', action='store_true', | ||
138 | help='checkout an archive instead of a git repository for ' | ||
139 | 'each project. See git archive.') | ||
140 | g.add_option('--submodules', | ||
141 | dest='submodules', action='store_true', | ||
142 | help='sync any submodules associated with the manifest repo') | ||
143 | g.add_option('--use-superproject', action='store_true', | ||
144 | help='use the manifest superproject to sync projects') | ||
145 | g.add_option('--no-use-superproject', action='store_false', | ||
146 | dest='use_superproject', | ||
147 | help='disable use of manifest superprojects') | ||
148 | g.add_option('-g', '--groups', | ||
149 | dest='groups', default='default', | ||
150 | help='restrict manifest projects to ones with specified ' | ||
151 | 'group(s) [default|all|G1,G2,G3|G4,-G5,-G6]', | ||
152 | metavar='GROUP') | ||
153 | g.add_option('-p', '--platform', | ||
154 | dest='platform', default='auto', | ||
155 | help='restrict manifest projects to ones with a specified ' | ||
156 | 'platform group [auto|all|none|linux|darwin|...]', | ||
157 | metavar='PLATFORM') | ||
158 | g.add_option('--clone-bundle', action='store_true', | ||
159 | help='force use of /clone.bundle on HTTP/HTTPS (default if not --partial-clone)') | ||
160 | g.add_option('--no-clone-bundle', | ||
161 | dest='clone_bundle', action='store_false', | ||
162 | help='disable use of /clone.bundle on HTTP/HTTPS (default if --partial-clone)') | ||
163 | g.add_option('--no-tags', | ||
164 | dest='tags', default=True, action='store_false', | ||
165 | help="don't fetch tags in the manifest") | ||
166 | |||
167 | # Tool | ||
168 | g = p.add_option_group('repo Version options') | ||
169 | g.add_option('--repo-url', | ||
170 | dest='repo_url', | ||
171 | help='repo repository location', metavar='URL') | ||
172 | g.add_option('--repo-rev', metavar='REV', | ||
173 | help='repo branch or revision') | ||
174 | g.add_option('--repo-branch', dest='repo_rev', | ||
175 | help=optparse.SUPPRESS_HELP) | ||
176 | g.add_option('--no-repo-verify', | ||
177 | dest='repo_verify', default=True, action='store_false', | ||
178 | help='do not verify repo source code') | ||
179 | |||
180 | # Other | ||
181 | g = p.add_option_group('Other options') | ||
182 | g.add_option('--config-name', | ||
183 | dest='config_name', action="store_true", default=False, | ||
184 | help='Always prompt for name/e-mail') | ||
185 | 84 | ||
186 | def _RegisteredEnvironmentOptions(self): | 85 | def _RegisteredEnvironmentOptions(self): |
187 | return {'REPO_MANIFEST_URL': 'manifest_url', | 86 | return {'REPO_MANIFEST_URL': 'manifest_url', |