mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
stage: fix commit (#3816)
This commit is contained in:
@@ -377,11 +377,7 @@ class Stage(params.StageParams):
|
||||
|
||||
@staticmethod
|
||||
def _changed_entries(entries):
|
||||
return [
|
||||
str(entry)
|
||||
for entry in entries
|
||||
if entry.checksum and entry.changed_checksum()
|
||||
]
|
||||
return [str(entry) for entry in entries if entry.changed_checksum()]
|
||||
|
||||
def _changed_stage_entry(self):
|
||||
return f"'md5' of {self} changed."
|
||||
|
||||
@@ -70,3 +70,13 @@ def test_commit_changed_md5(tmp_dir, dvc):
|
||||
dvc.commit(stage.path)
|
||||
|
||||
dvc.commit(stage.path, force=True)
|
||||
|
||||
|
||||
def test_commit_no_exec(tmp_dir, dvc):
|
||||
tmp_dir.gen({"dep": "dep", "out": "out"})
|
||||
stage = dvc.run(
|
||||
name="my", cmd="mycmd", deps=["dep"], outs=["out"], no_exec=True
|
||||
)
|
||||
assert dvc.status(stage.path)
|
||||
dvc.commit(stage.path, force=True)
|
||||
assert dvc.status(stage.path) == {}
|
||||
|
||||
Reference in New Issue
Block a user