diff options
Diffstat (limited to 'subcmds')
| -rw-r--r-- | subcmds/sync.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/subcmds/sync.py b/subcmds/sync.py index 3d42a0a7..cb285290 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py | |||
| @@ -234,9 +234,12 @@ later is required to fix a server side protocol bug. | |||
| 234 | p.add_option('-c', '--current-branch', | 234 | p.add_option('-c', '--current-branch', |
| 235 | dest='current_branch_only', action='store_true', | 235 | dest='current_branch_only', action='store_true', |
| 236 | help='fetch only current branch from server') | 236 | help='fetch only current branch from server') |
| 237 | p.add_option('-v', '--verbose', | ||
| 238 | dest='output_mode', action='store_true', | ||
| 239 | help='show all sync output') | ||
| 237 | p.add_option('-q', '--quiet', | 240 | p.add_option('-q', '--quiet', |
| 238 | dest='quiet', action='store_true', | 241 | dest='output_mode', action='store_false', |
| 239 | help='be more quiet') | 242 | help='only show errors') |
| 240 | p.add_option('-j', '--jobs', | 243 | p.add_option('-j', '--jobs', |
| 241 | dest='jobs', action='store', type='int', | 244 | dest='jobs', action='store', type='int', |
| 242 | help="projects to fetch simultaneously (default %d)" % self.jobs) | 245 | help="projects to fetch simultaneously (default %d)" % self.jobs) |
| @@ -332,6 +335,7 @@ later is required to fix a server side protocol bug. | |||
| 332 | try: | 335 | try: |
| 333 | success = project.Sync_NetworkHalf( | 336 | success = project.Sync_NetworkHalf( |
| 334 | quiet=opt.quiet, | 337 | quiet=opt.quiet, |
| 338 | verbose=opt.verbose, | ||
| 335 | current_branch_only=opt.current_branch_only, | 339 | current_branch_only=opt.current_branch_only, |
| 336 | force_sync=opt.force_sync, | 340 | force_sync=opt.force_sync, |
| 337 | clone_bundle=not opt.no_clone_bundle, | 341 | clone_bundle=not opt.no_clone_bundle, |
| @@ -835,7 +839,7 @@ later is required to fix a server side protocol bug. | |||
| 835 | """Fetch & update the local manifest project.""" | 839 | """Fetch & update the local manifest project.""" |
| 836 | if not opt.local_only: | 840 | if not opt.local_only: |
| 837 | start = time.time() | 841 | start = time.time() |
| 838 | success = mp.Sync_NetworkHalf(quiet=opt.quiet, | 842 | success = mp.Sync_NetworkHalf(quiet=opt.quiet, verbose=opt.verbose, |
| 839 | current_branch_only=opt.current_branch_only, | 843 | current_branch_only=opt.current_branch_only, |
| 840 | no_tags=opt.no_tags, | 844 | no_tags=opt.no_tags, |
| 841 | optimized_fetch=opt.optimized_fetch, | 845 | optimized_fetch=opt.optimized_fetch, |
| @@ -883,6 +887,9 @@ later is required to fix a server side protocol bug. | |||
| 883 | soft_limit, _ = _rlimit_nofile() | 887 | soft_limit, _ = _rlimit_nofile() |
| 884 | self.jobs = min(self.jobs, (soft_limit - 5) // 3) | 888 | self.jobs = min(self.jobs, (soft_limit - 5) // 3) |
| 885 | 889 | ||
| 890 | opt.quiet = opt.output_mode is False | ||
| 891 | opt.verbose = opt.output_mode is True | ||
| 892 | |||
| 886 | if opt.manifest_name: | 893 | if opt.manifest_name: |
| 887 | self.manifest.Override(opt.manifest_name) | 894 | self.manifest.Override(opt.manifest_name) |
| 888 | 895 | ||
