summaryrefslogtreecommitdiff
path: root/morphlib/sourceresolver.py
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2016-03-03 10:35:52 +0000
committerSam Thursfield <sam.thursfield@codethink.co.uk>2016-03-03 15:31:49 +0000
commite8a67a7d12d2defbf975d707e7513837403d93a2 (patch)
tree376919bf85989db6a44d3377582d6419e889a864 /morphlib/sourceresolver.py
parentbb139ecf1b9de3b221ff1d93c26190a8623d5d33 (diff)
downloadmorph-e8a67a7d12d2defbf975d707e7513837403d93a2.tar.gz
Hide get_repo() and cache_repo() functions, always use get_updated_repo()
This allows us to simplify a couple of places. I cannot think of a single situation where'd you want to get the cached copy of a repo, but not update it. Think about it -- the repo might be *years* behind the upstream remote. Change-Id: I60340c7fb33e7bfe871ad30c0a9322a7202548e2
Diffstat (limited to 'morphlib/sourceresolver.py')
-rw-r--r--morphlib/sourceresolver.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/morphlib/sourceresolver.py b/morphlib/sourceresolver.py
index 204fdb7d..c6f77cf9 100644
--- a/morphlib/sourceresolver.py
+++ b/morphlib/sourceresolver.py
@@ -200,11 +200,7 @@ class SourceResolver(object):
absref = None
if self.lrc.has_repo(reponame):
- repo = self.lrc.get_repo(reponame)
- if self.update and repo.requires_update_for_ref(ref):
- self.status(msg='Updating cached git repository %(reponame)s '
- 'for ref %(ref)s', reponame=reponame, ref=ref)
- repo.update()
+ repo = self.lrc.get_updated_repo(reponame, ref)
# If the user passed --no-git-update, and the ref is a SHA1 not
# available locally, this call will raise an exception.
absref = repo.resolve_ref_to_commit(ref)