mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-08 23:09:48 +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]>
24 lines
553 B
Python
24 lines
553 B
Python
from __future__ import unicode_literals
|
|
|
|
import os
|
|
|
|
import dvc.logger as logger
|
|
from dvc.command.base import CmdBase
|
|
|
|
|
|
class CmdRoot(CmdBase):
|
|
def run_cmd(self):
|
|
return self.run()
|
|
|
|
def run(self):
|
|
logger.info(os.path.relpath(self.repo.root_dir))
|
|
return 0
|
|
|
|
|
|
def add_parser(subparsers, parent_parser):
|
|
ROOT_HELP = "Relative path to repo's directory."
|
|
root_parser = subparsers.add_parser(
|
|
"root", parents=[parent_parser], description=ROOT_HELP, help=ROOT_HELP
|
|
)
|
|
root_parser.set_defaults(func=CmdRoot)
|