summaryrefslogtreecommitdiff
path: root/buildstream/plugins/sources
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2018-10-02 20:51:19 +0900
committerTristan Van Berkom <tristan.van.berkom@gmail.com>2018-10-03 07:33:48 +0000
commit29c19bead406e76b6b7cf50b6e354d44b17e6182 (patch)
tree91d254e5eaf2b7823d6eb232e04162e24ecc67c8 /buildstream/plugins/sources
parent66446fc343c7f324da0a2995e7190fb4569b35c9 (diff)
downloadbuildstream-29c19bead406e76b6b7cf50b6e354d44b17e6182.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.
Diffstat (limited to 'buildstream/plugins/sources')
-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 77db9534a..bce399cd9 100644
--- a/buildstream/plugins/sources/git.py
+++ b/buildstream/plugins/sources/git.py
@@ -184,10 +184,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: