summaryrefslogtreecommitdiff
path: root/morphlib/repocache.py
diff options
context:
space:
mode:
Diffstat (limited to 'morphlib/repocache.py')
-rw-r--r--morphlib/repocache.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/morphlib/repocache.py b/morphlib/repocache.py
index 58e05129..45d9807d 100644
--- a/morphlib/repocache.py
+++ b/morphlib/repocache.py
@@ -245,6 +245,9 @@ class RepoCache(object):
return True, None
+ def _new_cached_repo_instance(self, reponame, repourl, path):
+ return CachedRepo(reponame, repourl, path)
+
def _cache_repo(self, reponame):
'''Clone the given repo into the cache.
@@ -292,7 +295,7 @@ class RepoCache(object):
repourl = self._resolver.pull_url(reponame)
path = self._cache_name(repourl)
if self.fs.exists(path):
- repo = CachedRepo(path, reponame, repourl)
+ repo = self._new_cached_repo_instance(path, reponame, repourl)
self._cached_repo_objects[reponame] = repo
return repo
elif self.update_gits:
@@ -303,7 +306,7 @@ class RepoCache(object):
def _update_repo(self, cachedrepo): # pragma: no cover
try:
cachedrepo.update_remotes(
- echo_stderr=self._app.settings['verbose'])
+ echo_stderr=self.verbose)
cachedrepo.already_updated = True
except cliapp.AppException:
raise UpdateError(self)
@@ -420,7 +423,7 @@ class RepoCache(object):
return absref, ref
-class RemoteResolveRefError(cliapp.AppException):
+class RemoteResolveRefError(cliapp.AppException): # pragma: no cover
def __init__(self, repo_name, ref):
cliapp.AppException.__init__(