Always capture output for GitCommand
Switch the GitCommand program to always capture the output for stdout
and stderr. And by default print the output while running.
The options capture_stdout and capture_stderr have effectively become
options to supress the printing of stdout and stderr.
Update the 'git fetch' to use '--progress' so that the progress messages
will be displayed. git checks if the output location isatty() and if it
is not a TTY it will by default not print the progress messages.
Change-Id: Ifdae138e008f80a59195f9f43c911a1a5210ec60
diff --git a/project.py b/project.py
index 028deb5..1245fa2 100644
--- a/project.py
+++ b/project.py
@@ -1874,10 +1874,8 @@
ok = False
for _i in range(2):
- gitcmd = GitCommand(self, cmd, bare=True, capture_stderr=True,
- ssh_proxy=ssh_proxy)
+ gitcmd = GitCommand(self, cmd, bare=True, ssh_proxy=ssh_proxy)
ret = gitcmd.Wait()
- print(gitcmd.stderr, file=sys.stderr, end='')
if ret == 0:
ok = True
break
@@ -1886,9 +1884,8 @@
"error:" in gitcmd.stderr and
"git remote prune" in gitcmd.stderr):
prunecmd = GitCommand(self, ['remote', 'prune', name], bare=True,
- capture_stderr=True, ssh_proxy=ssh_proxy)
+ ssh_proxy=ssh_proxy)
ret = prunecmd.Wait()
- print(prunecmd.stderr, file=sys.stderr, end='')
if ret:
break
continue