summaryrefslogtreecommitdiff
path: root/buildstream/_frontend/cli.py
diff options
context:
space:
mode:
authorGökçen Nurlu <gnurlu1@bloomberg.net>2018-10-29 18:44:21 +0000
committerGökçen Nurlu <gnurlu1@bloomberg.net>2018-10-29 18:44:21 +0000
commit7951f7f6171cc201451ee696f69e2820638a9e8b (patch)
treef5569b79964ee36fb4f5e1906e91d74e06308f51 /buildstream/_frontend/cli.py
parent0ad43c10ab467fef6e04813b9da0ca42c2d86eea (diff)
downloadbuildstream-no_auto_fetch.tar.gz
Add explicit fetch flag for 'bst workspace-reset'no_auto_fetch
Diffstat (limited to 'buildstream/_frontend/cli.py')
-rw-r--r--buildstream/_frontend/cli.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/buildstream/_frontend/cli.py b/buildstream/_frontend/cli.py
index b73771165..07880f9bd 100644
--- a/buildstream/_frontend/cli.py
+++ b/buildstream/_frontend/cli.py
@@ -777,8 +777,10 @@ def workspace_close(app, remove_dir, all_, elements):
help="Reset all open workspaces")
@click.argument('elements', nargs=-1,
type=click.Path(readable=False))
+@click.option('--fetch', 'fetch_', default=False, is_flag=True,
+ help="Enable auto-fetching of element and related junction(s)")
@click.pass_obj
-def workspace_reset(app, soft, track_, all_, elements):
+def workspace_reset(app, soft, track_, all_, elements, fetch_):
"""Reset a workspace to its original state"""
# Check that the workspaces in question exist
@@ -798,7 +800,7 @@ def workspace_reset(app, soft, track_, all_, elements):
if all_:
elements = tuple(element_name for element_name, _ in app.context.get_workspaces().list())
- app.stream.workspace_reset(elements, soft=soft, track_first=track_)
+ app.stream.workspace_reset(elements, soft=soft, track_first=track_, fetch=fetch_)
##################################################################