mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-08 15:28:26 +01:00
1) split Project's methods into separate files; 2) rename Project into Repo(similar to gitpython's Repo) Signed-off-by: Ruslan Kuprieiev <[email protected]>
26 lines
640 B
Python
26 lines
640 B
Python
from __future__ import unicode_literals
|
|
|
|
import dvc.logger as logger
|
|
from dvc.command.base import CmdBase
|
|
|
|
|
|
class CmdInstall(CmdBase):
|
|
def run_cmd(self):
|
|
try:
|
|
self.repo.install()
|
|
except Exception:
|
|
logger.error("failed to install dvc hooks")
|
|
return 1
|
|
return 0
|
|
|
|
|
|
def add_parser(subparsers, parent_parser):
|
|
INSTALL_HELP = "Install dvc hooks into the repository."
|
|
install_parser = subparsers.add_parser(
|
|
"install",
|
|
parents=[parent_parser],
|
|
description=INSTALL_HELP,
|
|
help=INSTALL_HELP,
|
|
)
|
|
install_parser.set_defaults(func=CmdInstall)
|