From ee8d9a1312797071becbb9731c1abd9e066bbbfc Mon Sep 17 00:00:00 2001 From: Alexander Schepanovski Date: Tue, 23 Apr 2019 17:02:15 +0700 Subject: [PATCH] dvc: improve apply_diff() docstring - explain how it works and why is it needed - fix typo --- dvc/utils/collections.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dvc/utils/collections.py b/dvc/utils/collections.py index 2d7b259fa..e1367d10a 100644 --- a/dvc/utils/collections.py +++ b/dvc/utils/collections.py @@ -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)