keep stage.dump and dvcfile.dump in sync (#5382)

This commit is contained in:
Saugat Pachhai
2021-02-02 15:11:13 +05:45
committed by GitHub
parent d05be36694
commit 4348832b44
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -135,7 +135,7 @@ class CmdStageAdd(CmdBase):
with repo.scm.track_file_changes(config=repo.config):
stage.ignore_outs()
stage.dump()
stage.dump(update_lock=False)
return 0
+2 -2
View File
@@ -701,8 +701,8 @@ class Stage(params.StageParams):
self.outs[0].merge(ancestor_out, other.outs[0])
def dump(self, update_lock: bool = False):
self.dvcfile.dump(self, update_lock=update_lock)
def dump(self, **kwargs):
self.dvcfile.dump(self, **kwargs)
class PipelineStage(Stage):
+1 -1
View File
@@ -27,7 +27,7 @@ def test_repro_unicode(tmp_dir, dvc, dummy_stage):
dummy_stage(params=[{"settings.json": ["Ω_value"]}])
(stage,) = dvc.reproduce(dry=True)
stage.cmd = "foo"
stage.dvcfile._lockfile.dump(stage)
stage.dump()
dvc.remove(stage.name)
assert not (tmp_dir / "dvc.yaml").exists()