mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-10 07:18:27 +01:00
We are always loading state when taking a repo lock, so doing it right in @locked decorator simplifies the code for Repo methods.
11 lines
293 B
Python
11 lines
293 B
Python
from . import locked
|
|
|
|
|
|
@locked
|
|
def commit(self, target, with_deps=False, recursive=False, force=False):
|
|
stages = self.collect(target, with_deps=with_deps, recursive=recursive)
|
|
for stage in stages:
|
|
stage.check_can_commit(force=force)
|
|
stage.commit()
|
|
stage.dump()
|