repo: introduce data_index

Extracting from `index.data` as a "root" data index that contains indexes
for different revisions/workspaces.

This is a setup for putting cloud versioning remote indexes and also replacing
old state.
This commit is contained in:
Ruslan Kuprieiev
2023-02-13 06:31:44 +02:00
parent 86a6fb104a
commit e73d662686
3 changed files with 38 additions and 26 deletions
+3 -2
View File
@@ -199,7 +199,8 @@ def test_verify_hashes(tmp_dir, scm, dvc, mocker, tmp_path_factory, local_remote
hash_spy = mocker.spy(dvc_data.hashfile.hash, "file_md5")
dvc.pull()
assert hash_spy.call_count == 0
# NOTE: 1 is for index.data_tree building
assert hash_spy.call_count == 1
# Removing cache will invalidate existing state entries
dvc.cache.local.clear()
@@ -207,7 +208,7 @@ def test_verify_hashes(tmp_dir, scm, dvc, mocker, tmp_path_factory, local_remote
dvc.config["remote"]["upstream"]["verify"] = True
dvc.pull()
assert hash_spy.call_count == 4
assert hash_spy.call_count == 6
@flaky(max_runs=3, min_passes=1)