diff --git a/dvc/repo/__init__.py b/dvc/repo/__init__.py index bbda875e5..3a44bf0c4 100644 --- a/dvc/repo/__init__.py +++ b/dvc/repo/__init__.py @@ -368,7 +368,8 @@ class Repo: if path_isin(self.odb.local.cache_dir, self.root_dir): flist += [self.odb.local.cache_dir] - self.scm.ignore_list(flist) + for file in flist: + self.scm_context.ignore(file) def brancher(self, *args, **kwargs): from dvc.repo.brancher import brancher diff --git a/dvc/scm/base.py b/dvc/scm/base.py index 96d46dee5..9fda3afa9 100644 --- a/dvc/scm/base.py +++ b/dvc/scm/base.py @@ -99,10 +99,6 @@ class Base: def ignore_file(self): """Filename for a file that contains ignored paths for this SCM.""" - def ignore_list(self, p_list): - """Makes SCM ignore all paths specified in a list.""" - return [self.ignore(path) for path in p_list] - def add(self, paths): """Makes SCM track every path from a specified list of paths.""" diff --git a/tests/func/test_repo_index.py b/tests/func/test_repo_index.py index 3cfda15ac..e6d1eb7c6 100644 --- a/tests/func/test_repo_index.py +++ b/tests/func/test_repo_index.py @@ -200,7 +200,7 @@ def test_dumpd(dvc): def test_unique_identifier(tmp_dir, dvc, scm, run_copy): - dvc.config["core"]["autostage"] = True + dvc.scm_context.autostage = True tmp_dir.dvc_gen("foo", "foo") run_copy("foo", "bar", name="copy-foo-bar")