Skip to content

Commit

Permalink
repo: update for new erepo function calls
Browse files Browse the repository at this point in the history
  • Loading branch information
pmrowla committed May 14, 2020
1 parent dc71713 commit b9cef02
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
8 changes: 4 additions & 4 deletions dvc/dependency/repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ def _get_checksum(self, locked=True):
except OutputNotFoundError:
path = PathInfo(os.path.join(repo.root_dir, self.def_path))
# We are polluting our repo cache with some dir listing here
with repo.use_cache(self.repo.cache.local):
return repo.get_checksum(path)
return repo.repo_tree.get_checksum(path, self.repo.cache.local)

def status(self):
current_checksum = self._get_checksum(locked=True)
Expand All @@ -79,8 +78,9 @@ def download(self, to):
if self.def_repo.get(self.PARAM_REV_LOCK) is None:
self.def_repo[self.PARAM_REV_LOCK] = repo.get_rev()

with repo.use_cache(self.repo.cache.local):
repo.get_external(self.def_path, to.path_info)
repo.get_external(
self.def_path, to.path_info, cache=self.repo.cache.local
)

def update(self, rev=None):
if rev:
Expand Down
3 changes: 1 addition & 2 deletions dvc/repo/fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,4 @@ def _fetch_external(self, repo_url, repo_rev, files, **kwargs):
from dvc.external_repo import external_repo

with external_repo(repo_url, repo_rev) as repo:
with repo.use_cache(self.cache.local):
return repo.fetch_external(files, **kwargs)
return repo.fetch_external(files, cache=self.cache.local, **kwargs)

0 comments on commit b9cef02

Please sign in to comment.