From 2ca11fde3b63f6daa6d58ece4155a6d42ed92b34 Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Sat, 7 Apr 2018 18:51:52 +0900 Subject: _frontend/cli.py: Remove --no-checkout option for `bst workspace reset` This option in `bst workspace reset` is just pointless. --- buildstream/_frontend/app.py | 5 ++--- buildstream/_frontend/cli.py | 6 ++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/buildstream/_frontend/app.py b/buildstream/_frontend/app.py index 38ba4b3ac..e607814a1 100644 --- a/buildstream/_frontend/app.py +++ b/buildstream/_frontend/app.py @@ -395,9 +395,8 @@ class App(): # # Args: # track (bool): Whether to also track the source - # no_checkout (bool): Whether to check out the source (at all) # - def reset_workspace(self, track, no_checkout): + def reset_workspace(self, track): # When working on workspaces we only have one target target = self.pipeline.targets[0] workspace = self.project.workspaces.get_workspace(target.name) @@ -407,7 +406,7 @@ class App(): .format(target.name)) self.close_workspace(target.name, True) - self.open_workspace(workspace.path, no_checkout, track, False) + self.open_workspace(workspace.path, False, track, False) ############################################################ # Local Functions # diff --git a/buildstream/_frontend/cli.py b/buildstream/_frontend/cli.py index 345e2eac7..aab209003 100644 --- a/buildstream/_frontend/cli.py +++ b/buildstream/_frontend/cli.py @@ -612,12 +612,10 @@ def workspace_close(app, remove_dir, all_, elements): @workspace.command(name='reset', short_help="Reset a workspace to its original state") @click.option('--track', 'track_', default=False, is_flag=True, help="Track and fetch the latest source before resetting") -@click.option('--no-checkout', default=False, is_flag=True, - help="Do not checkout the source, only link to the given directory") @click.argument('element', type=click.Path(dir_okay=False, readable=True)) @click.pass_obj -def workspace_reset(app, track_, no_checkout, element): +def workspace_reset(app, track_, element): """Reset a workspace to its original state""" if app.interactive: if not click.confirm('This will remove all your changes, are you sure?'): @@ -625,7 +623,7 @@ def workspace_reset(app, track_, no_checkout, element): sys.exit(-1) with app.initialized((element,)): - app.reset_workspace(track_, no_checkout) + app.reset_workspace(track_) ################################################################## -- cgit v1.2.1