MCPcopy Index your code
hub / github.com/treeverse/dvc / _prepare_message

Function _prepare_message

dvc/repo/commit.py:14–33  ·  view source on GitHub ↗
(stage, changes)

Source from the content-addressed store, hash-verified

12
13
14def _prepare_message(stage, changes):
15 changed_deps, changed_outs, changed_stage = changes
16 if changed_deps and changed_outs:
17 msg = "dependencies {deps} and outputs {outs} of {stage} changed."
18 elif changed_deps:
19 msg = "dependencies {deps} of {stage} changed."
20 elif changed_outs:
21 msg = "outputs {outs} of {stage} changed."
22 else:
23 msg = "{stage_changed}"
24
25 msg += " Are you sure you want to commit it?"
26
27 kw = {
28 "stage": stage,
29 "deps": changed_deps,
30 "outs": changed_outs,
31 "stage_changed": changed_stage,
32 }
33 return msg.format_map(kw)
34
35
36def prompt_to_commit(stage, changes, force=False):

Callers 1

prompt_to_commitFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected