summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2018-10-02 20:51:19 +0900
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2018-10-02 20:51:19 +0900
commita009dcbe9fa0d3b8047dd5f6c71c4adc6ef7aa6c (patch)
tree8a0916b787f14042cf7408a4f09d4c0d9fd1e651
parent764b75173609b90eacbc0b0165ab98c2d3fdf9a8 (diff)
downloadbuildstream-a009dcbe9fa0d3b8047dd5f6c71c4adc6ef7aa6c.tar.gz
git.py: Added timed activity around fetching, displaying the URL being fetched.
This will take care of silencing the status messages while checking submodules.
-rw-r--r--buildstream/plugins/sources/git.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/buildstream/plugins/sources/git.py b/buildstream/plugins/sources/git.py
index 065870169..de0376776 100644
--- a/buildstream/plugins/sources/git.py
+++ b/buildstream/plugins/sources/git.py
@@ -164,10 +164,18 @@ class GitMirror(SourceFetcher):
cwd=self.mirror)
def fetch(self, alias_override=None):
- self.ensure(alias_override)
- if not self.has_ref():
- self._fetch(alias_override)
- self.assert_ref()
+ # Resolve the URL for the message
+ resolved_url = self.source.translate_url(self.url,
+ alias_override=alias_override,
+ primary=self.primary)
+
+ with self.source.timed_activity("Fetching from {}"
+ .format(resolved_url),
+ silent_nested=True):
+ self.ensure(alias_override)
+ if not self.has_ref():
+ self._fetch(alias_override)
+ self.assert_ref()
def has_ref(self):
if not self.ref: