mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-09 23:10:24 +01:00
keep stage.dump and dvcfile.dump in sync (#5382)
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user