diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2018-04-07 18:51:52 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2018-04-07 19:02:13 +0900 |
commit | 2ca11fde3b63f6daa6d58ece4155a6d42ed92b34 (patch) | |
tree | 728c90a6c3376affbf4b29b1b26b008af6d895e1 /buildstream/_frontend | |
parent | 74c60178c74f08144e2d876890f02ea3aaf62b13 (diff) | |
download | buildstream-2ca11fde3b63f6daa6d58ece4155a6d42ed92b34.tar.gz |
_frontend/cli.py: Remove --no-checkout option for `bst workspace reset`
This option in `bst workspace reset` is just pointless.
Diffstat (limited to 'buildstream/_frontend')
-rw-r--r-- | buildstream/_frontend/app.py | 5 | ||||
-rw-r--r-- | 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_) ################################################################## |