mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-11 07:18:28 +01:00
dvc: add pull/push commands
We already have 'sync' command, but users report it to be confusing when both local and remote files exist, so lets introduce two direct commands to implicitly push and pull from cloud. Fixes #157. Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
@@ -6,4 +6,22 @@ class CmdDataSync(CmdBase):
|
||||
|
||||
def run(self):
|
||||
with DvcLock(self.is_locker, self.git):
|
||||
self.settings.cloud.sync(self.parsed_args.targets, self.parsed_args.jobs)
|
||||
self.cloud.sync(self.parsed_args.targets, self.parsed_args.jobs)
|
||||
|
||||
|
||||
class CmdDataPull(CmdBase):
|
||||
def __init__(self, settings):
|
||||
super(CmdDataPull, self).__init__(settings)
|
||||
|
||||
def run(self):
|
||||
with DvcLock(self.is_locker, self.git):
|
||||
self.cloud.pull(self.parsed_args.targets, self.parsed_args.jobs)
|
||||
|
||||
|
||||
class CmdDataPush(CmdBase):
|
||||
def __init__(self, settings):
|
||||
super(CmdDataPush, self).__init__(settings)
|
||||
|
||||
def run(self):
|
||||
with DvcLock(self.is_locker, self.git):
|
||||
self.cloud.push(self.parsed_args.targets, self.parsed_args.jobs)
|
||||
|
||||
Reference in New Issue
Block a user