This is an automated email from the ASF dual-hosted git repository.

tvb pushed a commit to branch tristan/remote-cli-options
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit 6ec5bf95bfc8ecb9f4bda0b1e5e66fc3dc1a2587
Author: Tristan van Berkom <[email protected]>
AuthorDate: Thu Feb 4 13:48:15 2021 +0900

    _frontend/cli.py: Removing support for deprecated commands.
    
    This has gone on long enough, there is no cause to keep supporting
    these older forms of commands.
---
 src/buildstream/_frontend/cli.py | 138 ---------------------------------------
 tests/frontend/help.py           |   2 +-
 2 files changed, 1 insertion(+), 139 deletions(-)

diff --git a/src/buildstream/_frontend/cli.py b/src/buildstream/_frontend/cli.py
index ab06e8a..e1d84a7 100644
--- a/src/buildstream/_frontend/cli.py
+++ b/src/buildstream/_frontend/cli.py
@@ -1395,141 +1395,3 @@ def artifact_delete(app, artifacts, deps):
     """Remove artifacts from the local cache"""
     with app.initialized():
         app.stream.artifact_delete(artifacts, selection=deps)
-
-
-##################################################################
-#                      DEPRECATED Commands                       #
-##################################################################
-
-# XXX: The following commands are now obsolete, but they are kept
-# here along with all the options so that we can provide nice error
-# messages when they are called.
-# Also, note that these commands are hidden from the top-level help.
-
-##################################################################
-#                          Fetch Command                         #
-##################################################################
[email protected](short_help="COMMAND OBSOLETE - Fetch sources in a pipeline", 
hidden=True)
[email protected](
-    "--except",
-    "except_",
-    multiple=True,
-    type=click.Path(readable=False),
-    help="Except certain dependencies from fetching",
-)
[email protected](
-    "--deps",
-    "-d",
-    default=_PipelineSelection.PLAN,
-    show_default=True,
-    type=FastEnumType(_PipelineSelection, [_PipelineSelection.NONE, 
_PipelineSelection.PLAN, _PipelineSelection.ALL]),
-    help="The dependencies to fetch",
-)
[email protected]("elements", nargs=-1, type=click.Path(readable=False))
[email protected]_obj
-def fetch(app, elements, deps, except_):
-    click.echo("This command is now obsolete. Use `bst source fetch` 
instead.", err=True)
-    sys.exit(1)
-
-
-##################################################################
-#                          Track Command                         #
-##################################################################
[email protected](short_help="COMMAND OBSOLETE - Track new source references", 
hidden=True)
[email protected](
-    "--except",
-    "except_",
-    multiple=True,
-    type=click.Path(readable=False),
-    help="Except certain dependencies from tracking",
-)
[email protected](
-    "--deps",
-    "-d",
-    default=_PipelineSelection.NONE,
-    show_default=True,
-    type=FastEnumType(_PipelineSelection, [_PipelineSelection.NONE, 
_PipelineSelection.ALL]),
-    help="The dependencies to track",
-)
[email protected]("--cross-junctions", "-J", is_flag=True, help="Allow crossing 
junction boundaries")
[email protected]("elements", nargs=-1, type=click.Path(readable=False))
[email protected]_obj
-def track(app, elements, deps, except_, cross_junctions):
-    click.echo("This command is now obsolete. Use `bst source track` 
instead.", err=True)
-    sys.exit(1)
-
-
-##################################################################
-#                        Checkout Command                        #
-##################################################################
[email protected](short_help="COMMAND OBSOLETE - Checkout a built artifact", 
hidden=True)
[email protected]("--force", "-f", is_flag=True, help="Allow files to be 
overwritten")
[email protected](
-    "--deps",
-    "-d",
-    default=_PipelineSelection.RUN,
-    show_default=True,
-    type=FastEnumType(_PipelineSelection, [_PipelineSelection.RUN, 
_PipelineSelection.BUILD, _PipelineSelection.NONE]),
-    help="The dependencies to checkout",
-)
[email protected]("--integrate/--no-integrate", default=True, help="Run 
integration commands (default is to run commands)")
[email protected]("--hardlinks", is_flag=True, help="Checkout hardlinks instead of 
copies (handle with care)")
[email protected](
-    "--tar",
-    is_flag=True,
-    help="Create a tarball from the artifact contents instead "
-    "of a file tree. If LOCATION is '-', the tarball "
-    "will be dumped to the standard output.",
-)
[email protected]("element", required=False, type=click.Path(readable=False))
[email protected]("location", type=click.Path(), required=False)
[email protected]_obj
-def checkout(app, element, location, force, deps, integrate, hardlinks, tar):
-    click.echo(
-        "This command is now obsolete. Use `bst artifact checkout` instead "
-        + "and use the --directory option to specify LOCATION",
-        err=True,
-    )
-    sys.exit(1)
-
-
-################################################################
-#                          Pull Command                        #
-################################################################
[email protected](short_help="COMMAND OBSOLETE - Pull a built artifact", 
hidden=True)
[email protected](
-    "--deps",
-    "-d",
-    default=_PipelineSelection.NONE,
-    show_default=True,
-    type=FastEnumType(_PipelineSelection, [_PipelineSelection.NONE, 
_PipelineSelection.ALL]),
-    help="The dependency artifacts to pull",
-)
[email protected]("--remote", "-r", help="The URL of the remote cache (defaults to 
the first configured cache)")
[email protected]("elements", nargs=-1, type=click.Path(readable=False))
[email protected]_obj
-def pull(app, elements, deps, remote):
-    click.echo("This command is now obsolete. Use `bst artifact pull` 
instead.", err=True)
-    sys.exit(1)
-
-
-##################################################################
-#                           Push Command                         #
-##################################################################
[email protected](short_help="COMMAND OBSOLETE - Push a built artifact", 
hidden=True)
[email protected](
-    "--deps",
-    "-d",
-    default=_PipelineSelection.NONE,
-    show_default=True,
-    type=FastEnumType(_PipelineSelection, [_PipelineSelection.NONE, 
_PipelineSelection.ALL]),
-    help="The dependencies to push",
-)
[email protected](
-    "--remote", "-r", default=None, help="The URL of the remote cache 
(defaults to the first configured cache)"
-)
[email protected]("elements", nargs=-1, type=click.Path(readable=False))
[email protected]_obj
-def push(app, elements, deps, remote):
-    click.echo("This command is now obsolete. Use `bst artifact push` 
instead.", err=True)
-    sys.exit(1)
diff --git a/tests/frontend/help.py b/tests/frontend/help.py
index 20a9316..bbb2ba9 100644
--- a/tests/frontend/help.py
+++ b/tests/frontend/help.py
@@ -20,7 +20,7 @@ def test_help_main(cli):
 
 
 @pytest.mark.parametrize(
-    "command", [("artifact"), ("build"), ("checkout"), ("shell"), ("show"), 
("source"), ("workspace")]
+    "command", [("artifact"), ("build"), ("shell"), ("show"), ("source"), 
("workspace")]
 )
 def test_help(cli, command):
     result = cli.run(args=[command, "--help"])

Reply via email to