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

Method run

dvc/commands/data_sync.py:32–57  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

30 super().log_summary(stats)
31
32 def run(self):
33 from dvc.exceptions import CheckoutError, DvcException
34
35 try:
36 result = self.repo.pull(
37 targets=self.args.targets,
38 jobs=self.args.jobs,
39 remote=self.args.remote,
40 all_branches=self.args.all_branches,
41 all_tags=self.args.all_tags,
42 all_commits=self.args.all_commits,
43 with_deps=self.args.with_deps,
44 force=self.args.force,
45 recursive=self.args.recursive,
46 run_cache=self.args.run_cache,
47 glob=self.args.glob,
48 allow_missing=self.args.allow_missing,
49 )
50 self.log_summary(result)
51 except (CheckoutError, DvcException) as exc:
52 if result := getattr(exc, "result", {}):
53 self.log_summary(result)
54 logger.exception("failed to pull data from the cloud")
55 return 1
56
57 return 0
58
59
60class CmdDataPush(CmdDataBase):

Callers

nothing calls this directly

Calls 2

log_summaryMethod · 0.95
pullMethod · 0.45

Tested by

no test coverage detected