repo: use fs instead of scm

SCM is used for both reading and writing operations, but in the former case -
as filesystem and in the latter - as actual scm/git. So we should distinguish
those and use fs directly, which follows the overall philosophy of being able
to use Repo on any fs.

Keeping `rev=` option for `Repo` because it is a very convenient way to get
repo instance from local path but for particular branch/tag/etc.

Pre-requisite for git/dvc/repofs refactorings.
This commit is contained in:
Ruslan Kuprieiev
2021-12-31 02:44:21 +02:00
parent 9a5614d326
commit 35d364a527
5 changed files with 47 additions and 51 deletions
+2 -2
View File
@@ -120,9 +120,9 @@ def test_branch_config(tmp_dir, scm):
scm.checkout("master")
with pytest.raises(NotDvcRepoError):
Repo(scm=scm, rev="master").close()
Repo(rev="master").close()
dvc = Repo(scm=scm, rev="branch")
dvc = Repo(rev="branch")
try:
assert dvc.config["remote"]["branch"]["url"] == "/some/path"
finally: