From debfb47446ae46a644bd73e9fa059097bde3dd3f Mon Sep 17 00:00:00 2001 From: Jorge Orpinel Date: Mon, 28 Sep 2020 03:46:32 -0400 Subject: [PATCH 1/2] guide: roll back top md5 in import dvc file ex of Merging per https://github.com/iterative/dvc.org/pull/1801#pullrequestreview-496870983 --- content/docs/user-guide/merge-conflicts.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/content/docs/user-guide/merge-conflicts.md b/content/docs/user-guide/merge-conflicts.md index 231cd3d9a2..407efe53e5 100644 --- a/content/docs/user-guide/merge-conflicts.md +++ b/content/docs/user-guide/merge-conflicts.md @@ -103,6 +103,11 @@ To resolve conflicted `.dvc` files generated by `dvc import` or `dvc import-url`, remove the conflicted hashes altogether: ```yaml +< < < < < < < HEAD +md5: 263395583f35403c8e0b1b94b30bea32 +======= +md5: 520d2602f440d13372435d91d3bfa176 +> > > > > > > branch frozen: true deps: - path: get-started/data.xml From 6796b4d806872dc654e43a597a2a12c364640f2e Mon Sep 17 00:00:00 2001 From: Jorge Orpinel Date: Mon, 28 Sep 2020 03:58:27 -0400 Subject: [PATCH 2/2] guide: mention top md5 field for import .dvc files in Metafiles guide per https://github.com/iterative/dvc.org/pull/1801#pullrequestreview-496870983 --- .../docs/user-guide/basic-concepts/import-stage.md | 2 +- .../docs/user-guide/dvc-files-and-directories.md | 14 ++++++++------ content/docs/user-guide/merge-conflicts.md | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/content/docs/user-guide/basic-concepts/import-stage.md b/content/docs/user-guide/basic-concepts/import-stage.md index 23dece59d8..e55500ff48 100644 --- a/content/docs/user-guide/basic-concepts/import-stage.md +++ b/content/docs/user-guide/basic-concepts/import-stage.md @@ -1,6 +1,6 @@ --- name: 'Import Stage' -match: ['import stage', 'import stages'] +match: ['import stage', 'import stages', 'imports'] --- `.dvc` file created with the `dvc import` or `dvc import-url` commands. They diff --git a/content/docs/user-guide/dvc-files-and-directories.md b/content/docs/user-guide/dvc-files-and-directories.md index 22d8dcebb3..ba2cbcb0b9 100644 --- a/content/docs/user-guide/dvc-files-and-directories.md +++ b/content/docs/user-guide/dvc-files-and-directories.md @@ -25,13 +25,13 @@ Git-enabled repositories). ## `.dvc` files -When you add a file or directory to a DVC project with `dvc add` or -`dvc import`, a `.dvc` file is created based on the data file name (e.g. -`data.xml.dvc`). These files contain the information needed to track the data -with DVC. +When you add a file or directory to a DVC project with `dvc add`, +`dvc import`, or `dvc import-url`, a `.dvc` file is created based on the data +file name (e.g. `data.xml.dvc`). These files contain the information needed to +track the data with DVC. They use a simple [YAML](https://yaml.org/) format, meant to be easy to read, -edit, or even created manually by users. Here is a full sample: +edit, or even created manually. Here is a sample: ```yaml outs: @@ -50,11 +50,13 @@ meta: that represent the files or directories tracked with DVC. Typically there is only one (but several can be added or combined manually). - `deps`: List of dependency entries (details below). Only present - when `dvc import` and `dvc import-url` are used to generate this `.dvc` file. + when `dvc import` or `dvc import-url` are used to generate this `.dvc` file. Typically there is only one (but several can be added manually). - `wdir`: Working directory for the `outs` and `deps` paths (relative to the `.dvc` file's location). If this field is not present explicitly, it defaults to `.` (the `.dvc` file's location). +- `md5`: (only for imports) MD5 hash of the import `.dvc` file + itself. - `meta` (optional): Arbitrary metadata can be added manually with this field. Any YAML contents is supported. `meta` contents are ignored by DVC, but they can be meaningful for user processes that read `.dvc` files. diff --git a/content/docs/user-guide/merge-conflicts.md b/content/docs/user-guide/merge-conflicts.md index 407efe53e5..0e650417bd 100644 --- a/content/docs/user-guide/merge-conflicts.md +++ b/content/docs/user-guide/merge-conflicts.md @@ -142,5 +142,5 @@ outs: And then `dvc update` the `.dvc` file to download the latest data from its original source. -> Note that updating will bring in the latest version of the data found in its +> Note that updating will bring in the latest version of the data from its > source, which may not correspond with any of the hashes that was removed.