diff options
Diffstat (limited to 'subcmds/sync.py')
-rw-r--r-- | subcmds/sync.py | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/subcmds/sync.py b/subcmds/sync.py index b8abb1a7..e7079879 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py | |||
@@ -167,13 +167,14 @@ later is required to fix a server side protocol bug. | |||
167 | """ | 167 | """ |
168 | PARALLEL_JOBS = 1 | 168 | PARALLEL_JOBS = 1 |
169 | 169 | ||
170 | def _Options(self, p, show_smart=True): | 170 | def _CommonOptions(self, p): |
171 | try: | 171 | try: |
172 | self.PARALLEL_JOBS = self.manifest.default.sync_j | 172 | self.PARALLEL_JOBS = self.manifest.default.sync_j |
173 | except ManifestParseError: | 173 | except ManifestParseError: |
174 | pass | 174 | pass |
175 | super()._Options(p) | 175 | super()._CommonOptions(p) |
176 | 176 | ||
177 | def _Options(self, p, show_smart=True): | ||
177 | p.add_option('--jobs-network', default=None, type=int, metavar='JOBS', | 178 | p.add_option('--jobs-network', default=None, type=int, metavar='JOBS', |
178 | help='number of network jobs to run in parallel (defaults to --jobs)') | 179 | help='number of network jobs to run in parallel (defaults to --jobs)') |
179 | p.add_option('--jobs-checkout', default=None, type=int, metavar='JOBS', | 180 | p.add_option('--jobs-checkout', default=None, type=int, metavar='JOBS', |
@@ -211,12 +212,6 @@ later is required to fix a server side protocol bug. | |||
211 | p.add_option('-c', '--current-branch', | 212 | p.add_option('-c', '--current-branch', |
212 | dest='current_branch_only', action='store_true', | 213 | dest='current_branch_only', action='store_true', |
213 | help='fetch only current branch from server') | 214 | help='fetch only current branch from server') |
214 | p.add_option('-v', '--verbose', | ||
215 | dest='output_mode', action='store_true', | ||
216 | help='show all sync output') | ||
217 | p.add_option('-q', '--quiet', | ||
218 | dest='output_mode', action='store_false', | ||
219 | help='only show errors') | ||
220 | p.add_option('-m', '--manifest-name', | 215 | p.add_option('-m', '--manifest-name', |
221 | dest='manifest_name', | 216 | dest='manifest_name', |
222 | help='temporary manifest to use for this sync', metavar='NAME.xml') | 217 | help='temporary manifest to use for this sync', metavar='NAME.xml') |
@@ -770,9 +765,6 @@ later is required to fix a server side protocol bug. | |||
770 | soft_limit, _ = _rlimit_nofile() | 765 | soft_limit, _ = _rlimit_nofile() |
771 | self.jobs = min(self.jobs, (soft_limit - 5) // 3) | 766 | self.jobs = min(self.jobs, (soft_limit - 5) // 3) |
772 | 767 | ||
773 | opt.quiet = opt.output_mode is False | ||
774 | opt.verbose = opt.output_mode is True | ||
775 | |||
776 | if opt.manifest_name: | 768 | if opt.manifest_name: |
777 | self.manifest.Override(opt.manifest_name) | 769 | self.manifest.Override(opt.manifest_name) |
778 | 770 | ||