Skip to content

Commit

Permalink
Resurrect rev-create as shim for core's create
Browse files Browse the repository at this point in the history
datalad/datalad#3383 replaces core's create with rev-create.  Add back
a compatibility alias, like we already do for diff and status.
  • Loading branch information
kyleam committed May 3, 2019
1 parent 3b57726 commit 73eb2c7
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
6 changes: 6 additions & 0 deletions datalad_revolution/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
# description of the command suite, displayed in cmdline help
"DataLad revolutionary command suite",
[
(
'datalad_revolution.revcreate',
'RevCreate',
'rev-create',
'rev_create'
),
(
'datalad_revolution.revstatus',
'RevStatus',
Expand Down
39 changes: 38 additions & 1 deletion datalad_revolution/revcreate.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,41 @@
'The `RevCreate` class can be imported with: '
'`from datalad.core.local.create import Create as RevCreate`')

from datalad.core.local.create import Create as RevCreate
from datalad.interface.base import (
build_doc,
)
from datalad.interface.utils import eval_results
from .dataset import (
rev_datasetmethod,
)

from datalad.core.local.create import Create


@build_doc
class RevCreate(Create):

@staticmethod
@rev_datasetmethod(name='rev_create')
@eval_results
def __call__(path=None,
initopts=None,
force=False,
description=None,
dataset=None,
no_annex=False,
fake_dates=False,
cfg_proc=None):
for r in Create.__call__(path=path,
initopts=initopts,
force=force,
description=description,
dataset=dataset,
no_annex=no_annex,
fake_dates=fake_dates,
cfg_proc=cfg_proc,
result_renderer=None,
result_xfm=None,
on_failure="ignore",
return_type='generator'):
yield r

0 comments on commit 73eb2c7

Please sign in to comment.