summaryrefslogtreecommitdiffstats
path: root/project.py
diff options
context:
space:
mode:
authorMike Frysinger <vapier@google.com>2020-02-17 01:35:18 -0500
committerMike Frysinger <vapier@google.com>2020-02-18 03:31:33 +0000
commit31990f009719730c8be9d33b8d6cc94048f6d54b (patch)
tree369ca676378b902dba89918a0a0bca7103892301 /project.py
parent16f2fae16f37d0ff77c7ba1ba58ccca036f6358b (diff)
downloadgit-repo-31990f009719730c8be9d33b8d6cc94048f6d54b.tar.gz
project: move successful fetch output behind verbose
Syncing projects works fine the majority of the time. So rather than dump all of that noisy output to stdout, lets capture it and only show when things fail or in verbose mode. This tidies up the default `repo sync` output. Bug: https://crbug.com/gerrit/11293 Change-Id: I8314dd92e1e6aadeb26e36a8c92610da419684e6 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/255413 Reviewed-by: David Pursehouse <dpursehouse@collab.net> Tested-by: Mike Frysinger <vapier@google.com>
Diffstat (limited to 'project.py')
-rw-r--r--project.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/project.py b/project.py
index 57a5832e..3c4b4aef 100644
--- a/project.py
+++ b/project.py
@@ -2365,7 +2365,8 @@ class Project(object):
2365 2365
2366 ok = False 2366 ok = False
2367 for _i in range(2): 2367 for _i in range(2):
2368 gitcmd = GitCommand(self, cmd, bare=True, ssh_proxy=ssh_proxy) 2368 gitcmd = GitCommand(self, cmd, bare=True, ssh_proxy=ssh_proxy,
2369 merge_output=True, capture_stdout=not verbose)
2369 ret = gitcmd.Wait() 2370 ret = gitcmd.Wait()
2370 if ret == 0: 2371 if ret == 0:
2371 ok = True 2372 ok = True
@@ -2388,6 +2389,8 @@ class Project(object):
2388 elif ret < 0: 2389 elif ret < 0:
2389 # Git died with a signal, exit immediately 2390 # Git died with a signal, exit immediately
2390 break 2391 break
2392 if not verbose:
2393 print('%s:\n%s' % (self.name, gitcmd.stdout), file=sys.stderr)
2391 time.sleep(random.randint(30, 45)) 2394 time.sleep(random.randint(30, 45))
2392 2395
2393 if initial: 2396 if initial: