mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-09 07:18:27 +01:00
repo: move: save stage after moving
This commit is contained in:
@@ -65,5 +65,6 @@ def move(self, from_path, to_path):
|
||||
|
||||
with self.state:
|
||||
out.move(to_out)
|
||||
stage.save()
|
||||
|
||||
stage.dump()
|
||||
|
||||
@@ -192,3 +192,11 @@ class TestMoveFileInsideDirectory(TestDvc):
|
||||
dvc_fullpath = os.path.join(self.DATA_DIR, "data.txt.dvc")
|
||||
self.assertTrue(os.path.exists(data_fullpath))
|
||||
self.assertTrue(os.path.exists(dvc_fullpath))
|
||||
|
||||
|
||||
def test_move_should_save_stage_info(dvc_repo, repo_dir):
|
||||
dvc_repo.add(repo_dir.DATA_DIR)
|
||||
|
||||
dvc_repo.move(repo_dir.DATA_DIR, "new_name")
|
||||
|
||||
assert dvc_repo.status() == {}
|
||||
|
||||
Reference in New Issue
Block a user