From b84227db8956b8f55f30841ec220c752a7ec9655 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Saugat=20Pachhai=20=28=E0=A4=B8=E0=A5=8C=E0=A4=97=E0=A4=BE?= =?UTF-8?q?=E0=A4=A4=29?= Date: Mon, 22 Nov 2021 09:18:52 +0545 Subject: [PATCH] scm: remove ignore list --- dvc/repo/__init__.py | 3 ++- dvc/scm/base.py | 4 ---- tests/func/test_repo_index.py | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) 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")