dvc: improve apply_diff() docstring

- explain how it works and why is it needed
- fix typo
This commit is contained in:
Alexander Schepanovski
2019-04-24 02:45:02 +03:00
committed by Ruslan Kuprieiev
parent 277b9e566c
commit ee8d9a1312
+8 -1
View File
@@ -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)