Skip to content
Snippets Groups Projects
Commit a009dcbe authored by Tristan Van Berkom's avatar Tristan Van Berkom
Browse files

git.py: Added timed activity around fetching, displaying the URL being fetched.

This will take care of silencing the status messages while checking submodules.
parent 764b7517
No related branches found
No related tags found
Loading
......@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment