Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion dvc/utils/collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@ def compact(args):


def apply_diff(src, dest):
"""Recursively apply changes from stc to dest"""
"""Recursively apply changes from src to dest.

Preserves dest type and hidden info in dest structure,
like ruamel.yaml leaves when parses files. This includes comments,
ordering and line foldings.

Used in Stage load/dump cycle to preserve comments and custom formatting.
"""
Seq = (list, tuple)
Container = (Mapping, list, tuple)

Expand Down
7 changes: 4 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
from git.exc import GitCommandNotFound

from dvc.repo import Repo as DvcRepo
from .basic_env import TestDirFixture, logger
from .basic_env import TestDirFixture


@pytest.fixture(autouse=True)
def debug():
logger.setLevel("DEBUG")
def debug(caplog):
with caplog.at_level("DEBUG", logger="dvc"):
yield


# Wrap class like fixture as pytest-like one to avoid code duplication
Expand Down