diff options
Diffstat (limited to 'project.py')
-rw-r--r-- | project.py | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -2440,8 +2440,10 @@ class Project(object): | |||
2440 | if os.path.exists(os.path.join(self.gitdir, 'shallow')): | 2440 | if os.path.exists(os.path.join(self.gitdir, 'shallow')): |
2441 | cmd.append('--depth=2147483647') | 2441 | cmd.append('--depth=2147483647') |
2442 | 2442 | ||
2443 | if quiet: | 2443 | if not verbose: |
2444 | cmd.append('--quiet') | 2444 | cmd.append('--quiet') |
2445 | if not quiet and sys.stdout.isatty(): | ||
2446 | cmd.append('--progress') | ||
2445 | if not self.worktree: | 2447 | if not self.worktree: |
2446 | cmd.append('--update-head-ok') | 2448 | cmd.append('--update-head-ok') |
2447 | cmd.append(name) | 2449 | cmd.append(name) |
@@ -2498,7 +2500,7 @@ class Project(object): | |||
2498 | ok = False | 2500 | ok = False |
2499 | for _i in range(2): | 2501 | for _i in range(2): |
2500 | gitcmd = GitCommand(self, cmd, bare=True, ssh_proxy=ssh_proxy, | 2502 | gitcmd = GitCommand(self, cmd, bare=True, ssh_proxy=ssh_proxy, |
2501 | merge_output=True, capture_stdout=not verbose) | 2503 | merge_output=True, capture_stdout=quiet) |
2502 | ret = gitcmd.Wait() | 2504 | ret = gitcmd.Wait() |
2503 | if ret == 0: | 2505 | if ret == 0: |
2504 | ok = True | 2506 | ok = True |
@@ -2578,8 +2580,10 @@ class Project(object): | |||
2578 | return False | 2580 | return False |
2579 | 2581 | ||
2580 | cmd = ['fetch'] | 2582 | cmd = ['fetch'] |
2581 | if quiet: | 2583 | if not verbose: |
2582 | cmd.append('--quiet') | 2584 | cmd.append('--quiet') |
2585 | if not quiet and sys.stdout.isatty(): | ||
2586 | cmd.append('--progress') | ||
2583 | if not self.worktree: | 2587 | if not self.worktree: |
2584 | cmd.append('--update-head-ok') | 2588 | cmd.append('--update-head-ok') |
2585 | cmd.append(bundle_dst) | 2589 | cmd.append(bundle_dst) |
@@ -2639,9 +2643,8 @@ class Project(object): | |||
2639 | # 22: HTTP page not retrieved. The requested url was not found or | 2643 | # 22: HTTP page not retrieved. The requested url was not found or |
2640 | # returned another error with the HTTP error code being 400 or above. | 2644 | # returned another error with the HTTP error code being 400 or above. |
2641 | # This return code only appears if -f, --fail is used. | 2645 | # This return code only appears if -f, --fail is used. |
2642 | if not quiet: | 2646 | if verbose: |
2643 | print("Server does not provide clone.bundle; ignoring.", | 2647 | print('Server does not provide clone.bundle; ignoring.') |
2644 | file=sys.stderr) | ||
2645 | return False | 2648 | return False |
2646 | elif curlret and not verbose and output: | 2649 | elif curlret and not verbose and output: |
2647 | print('%s' % output, file=sys.stderr) | 2650 | print('%s' % output, file=sys.stderr) |