From 2141a5ac65bf4e0b3063adfdb36fad5e33369d1d Mon Sep 17 00:00:00 2001 From: Ruslan Kuprieiev Date: Tue, 25 Jun 2019 01:48:06 +0300 Subject: [PATCH 1/2] import: add "beta feature" warning --- dvc/command/imp.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dvc/command/imp.py b/dvc/command/imp.py index c42558e53..610833a06 100644 --- a/dvc/command/imp.py +++ b/dvc/command/imp.py @@ -12,6 +12,11 @@ logger = logging.getLogger(__name__) class CmdImport(CmdBase): def run(self): + logger.warn( + "This is a beta feature! Do not use in the production! Old " + "`dvc import` is now called `dvc import-url`, please use " + "it instead." + ) try: self.repo.imp( self.args.url, @@ -31,7 +36,8 @@ class CmdImport(CmdBase): def add_parser(subparsers, parent_parser): IMPORT_HELP = ( - "Download data from DVC repository and take it under DVC control." + "BETA: Download data from DVC repository and take it under DVC " + "control." ) import_parser = subparsers.add_parser( From 1123a303bfa6c7b74a88edcbb3d3c2df751d8573 Mon Sep 17 00:00:00 2001 From: Ruslan Kuprieiev Date: Tue, 25 Jun 2019 01:49:55 +0300 Subject: [PATCH 2/2] import: require 'path' argument `dvc import` doesn't yet support importing the whole package. Signed-off-by: Ruslan Kuprieiev --- dvc/command/imp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dvc/command/imp.py b/dvc/command/imp.py index 610833a06..16e2beaf0 100644 --- a/dvc/command/imp.py +++ b/dvc/command/imp.py @@ -20,7 +20,7 @@ class CmdImport(CmdBase): try: self.repo.imp( self.args.url, - path=self.args.path, + self.args.path, out=self.args.out, rev=self.args.rev, ) @@ -49,7 +49,7 @@ def add_parser(subparsers, parent_parser): ) import_parser.add_argument("url", help="DVC repository URL.") import_parser.add_argument( - "path", nargs="?", help="Path to data within DVC repository." + "path", help="Path to data within DVC repository." ) import_parser.add_argument( "-o", "--out", nargs="?", help="Destination path to put data to."