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

Function pull

dvc/repo/pull.py:10–56  ·  view source on GitHub ↗
(  # noqa: PLR0913
    self,
    targets=None,
    jobs=None,
    remote=None,
    all_branches=False,
    with_deps=False,
    all_tags=False,
    force=False,
    recursive=False,
    all_commits=False,
    run_cache=False,
    glob=False,
    allow_missing=False,
)

Source from the content-addressed store, hash-verified

8
9@locked
10def pull( # noqa: PLR0913
11 self,
12 targets=None,
13 jobs=None,
14 remote=None,
15 all_branches=False,
16 with_deps=False,
17 all_tags=False,
18 force=False,
19 recursive=False,
20 all_commits=False,
21 run_cache=False,
22 glob=False,
23 allow_missing=False,
24):
25 if isinstance(targets, str):
26 targets = [targets]
27
28 expanded_targets = glob_targets(targets, glob=glob)
29
30 processed_files_count = self.fetch(
31 expanded_targets,
32 jobs,
33 remote=remote,
34 all_branches=all_branches,
35 all_tags=all_tags,
36 all_commits=all_commits,
37 with_deps=with_deps,
38 recursive=recursive,
39 run_cache=run_cache,
40 )
41 try:
42 result = self.checkout(
43 targets=expanded_targets,
44 with_deps=with_deps,
45 force=force,
46 recursive=recursive,
47 allow_missing=allow_missing,
48 )
49 except CheckoutError as exc:
50 # put fetched counts first
51 exc.result["stats"] = {"fetched": processed_files_count} | exc.result["stats"]
52 raise
53 else:
54 # put fetched counts first
55 result["stats"] = {"fetched": processed_files_count} | result["stats"]
56 return result

Callers

nothing calls this directly

Calls 3

glob_targetsFunction · 0.90
fetchMethod · 0.80
checkoutMethod · 0.45

Tested by

no test coverage detected