From bee04c6d5fd4bef06a4a85743bb48808125bfe86 Mon Sep 17 00:00:00 2001 From: Ruslan Kuprieiev Date: Fri, 11 Aug 2023 05:04:53 +0300 Subject: [PATCH] deps: bump dvc-data to 2.13.1 Fixes #9733 --- dvc/repo/checkout.py | 24 ++++++++++-------------- dvc/repo/worktree.py | 2 +- pyproject.toml | 2 +- 3 files changed, 12 insertions(+), 16 deletions(-) diff --git a/dvc/repo/checkout.py b/dvc/repo/checkout.py index 67e4ce268a..a722afd294 100644 --- a/dvc/repo/checkout.py +++ b/dvc/repo/checkout.py @@ -51,20 +51,16 @@ def _build_out_changes(index, changes): out_keys.append(key) out_changes = {} - for objects in changes.values(): - for change in objects: - for out_key in out_keys: - if ( - len(out_key) > len(change.key) - or change.key[: len(out_key)] != out_key - ): - continue - - if change.key == out_key: - out_changes[out_key] = change.typ - elif not out_changes.get(out_key): - out_changes[out_key] = MODIFY - break + for key, change in changes.items(): + for out_key in out_keys: + if len(out_key) > len(key) or key[: len(out_key)] != out_key: + continue + + if key == out_key: + out_changes[out_key] = change.typ + elif not out_changes.get(out_key): + out_changes[out_key] = MODIFY + break return out_changes diff --git a/dvc/repo/worktree.py b/dvc/repo/worktree.py index 9cf39253b6..319259d6bd 100644 --- a/dvc/repo/worktree.py +++ b/dvc/repo/worktree.py @@ -166,7 +166,7 @@ def push_worktree( latest_only=remote_obj.worktree, jobs=jobs, ) - pushed += sum(len(changes) for changes in diff.changes.values()) + pushed += len(diff.files_create) except VersioningNotSupported: logger.exception("") raise DvcException( diff --git a/pyproject.toml b/pyproject.toml index cdb3d6bcf3..325261eff3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,7 +34,7 @@ dependencies = [ "configobj>=5.0.6", "distro>=1.3", "dpath<3,>=2.1.0", - "dvc-data>=2.12.0,<2.13.0", + "dvc-data>=2.13.1,<2.14.0", "dvc-http>=2.29.0", "dvc-render>=0.3.1,<1", "dvc-studio-client>=0.9.2,<1",