Skip to content

Commit

Permalink
save_deps() before calculating the md5
Browse files Browse the repository at this point in the history
  • Loading branch information
isidentical authored and mergify-bot committed Jul 12, 2021
1 parent 78922b7 commit ade61ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions dvc/repo/imp_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ def imp_url(
elif to_remote:
remote = self.cloud.get_remote(remote, "import-url")
stage.outs[0].transfer(url, odb=remote.odb, jobs=jobs)
stage.save_deps()
stage.md5 = stage.compute_md5()
else:
stage.run(jobs=jobs)
Expand Down
1 change: 1 addition & 0 deletions tests/func/test_import_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ def test_import_url_to_remote_single_file(
url = "remote://workspace/foo"
stage = dvc.imp_url(url, to_remote=True)

assert stage.deps[0].hash_info.value is not None
assert not (tmp_dir / "foo").exists()
assert (tmp_dir / "foo.dvc").exists()

Expand Down

0 comments on commit ade61ab

Please sign in to comment.