Skip to content

import: same command creates .dvc file in different locations #4169

@shcheklein

Description

@shcheklein

DVC Version

~/example-get-started$ dvc version
DVC version: 1.0.1
Python version: 3.7.1
Platform: Linux-4.15.0-88-generic-x86_64-with-debian-buster-sid
Binary: True
Package: deb
Supported remotes: azure, gdrive, gs, hdfs, http, https, s3, ssh, oss
Cache: reflink - not supported, hardlink - supported, symlink - supported
Filesystem type (cache directory): ('ext4', '/dev/mapper/host01--vg-root')
Repo: dvc, git
Filesystem type (workspace): ('ext4', '/dev/mapper/host01--vg-root')

Reproduce

Run the same command:

dvc import https://github.com/iterative/dataset-registry get-started/data.xml -o data/data.xml

when data directory exists and when it does not.

In the first case we get:

Importing 'get-started/data.xml (https://github.com/iterative/dataset-registry)' -> 'data/data.xml'

To track the changes with git, run:

        git add data/data.xml.dvc

In the second case:

Importing 'get-started/data.xml (https://github.com/iterative/dataset-registry)' -> 'data/data.xml'

To track the changes with git, run:

        git add data.xml.dvc data/.gitignore

There are two bugs:

  • It creates data.xml.dvc in different locations (data/data.xml.dvc vs data.xml.dvc)
  • It doesn't mention .gitignore in the first case in the git add hint.

Metadata

Metadata

Assignees

Labels

bugDid we break something?p1-importantImportant, aka current backlog of things to do

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions