summaryrefslogtreecommitdiff
path: root/morphlib/cachedrepo.py
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2014-10-29 17:12:15 +0000
committerSam Thursfield <sam.thursfield@codethink.co.uk>2014-10-29 17:16:41 +0000
commit426526c692fecd520b1946f362e148d043c61441 (patch)
treeff1069aeea1f03a4cfe8233a6aa2def6c05bc9d2 /morphlib/cachedrepo.py
parent4f959335730d37be8d7cd53a2af668d8887e72cc (diff)
downloadmorph-426526c692fecd520b1946f362e148d043c61441.tar.gz
Echo stderr of subcommands that do network IO when --verbose is used
Morph can appear to hang in situations where it is actually waiting on a slow network operation. This change gives users a way to see the output of the subcommands that are doing the network IO (either 'wget', 'git clone' or 'git remote update'). The status information goes onto stderr, because that is where the subcommands write it. Morph tends to put its status output on stdout, but (a) some commands are machine-parsed, such as `serialise-artifact` and (b) it's tricky to get Git to put status output on stdout.
Diffstat (limited to 'morphlib/cachedrepo.py')
-rw-r--r--morphlib/cachedrepo.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/morphlib/cachedrepo.py b/morphlib/cachedrepo.py
index 30e08ad9..aad3d84e 100644
--- a/morphlib/cachedrepo.py
+++ b/morphlib/cachedrepo.py
@@ -298,7 +298,8 @@ class CachedRepo(object):
def _update(self): # pragma: no cover
morphlib.git.gitcmd(self._runcmd, 'remote', 'update',
- 'origin', '--prune')
+ 'origin', '--prune',
+ echo_stderr=self.app.settings['verbose'])
def __str__(self): # pragma: no cover
return self.url