MCPcopy
hub / github.com/treeverse/dvc / move

Method move

dvc/output.py:999–1016  ·  view source on GitHub ↗
(self, out: "Output")

Source from the content-addressed store, hash-verified

997 self.ignore_remove()
998
999 def move(self, out: "Output") -> None:
1000 src_exists = self.exists
1001 if src_exists:
1002 self.fs.move(self.fs_path, out.fs_path)
1003 else:
1004 logger.warning("%r missing", self.fspath)
1005
1006 if self.protocol == "local" and self.use_scm_ignore:
1007 assert self.repo
1008 self.repo.scm_context.ignore_remove(self.fspath)
1009
1010 self.def_path = out.def_path
1011 self.fs_path = out.fs_path
1012 try:
1013 self.save()
1014 self.commit()
1015 except self.DoesNotExistError:
1016 self.ignore()
1017
1018 def transfer(
1019 self, source, odb=None, jobs=None, update=False, no_progress_bar=False

Callers 15

runMethod · 0.80
moveFunction · 0.80
saveMethod · 0.80
testMethod · 0.80
test_partial_addFunction · 0.80
test_cloud_cliFunction · 0.80
test_renamesFunction · 0.80
test_rename_ignored_fileFunction · 0.80
test_rename_fileFunction · 0.80
test_moveFunction · 0.80

Calls 4

saveMethod · 0.95
commitMethod · 0.95
ignoreMethod · 0.95
ignore_removeMethod · 0.45

Tested by 15

testMethod · 0.64
test_partial_addFunction · 0.64
test_cloud_cliFunction · 0.64
test_renamesFunction · 0.64
test_rename_ignored_fileFunction · 0.64
test_rename_fileFunction · 0.64
test_moveFunction · 0.64
test_move_missing_fileFunction · 0.64
test_move_directoryFunction · 0.64