summaryrefslogtreecommitdiff
path: root/buildstream/_frontend/app.py
diff options
context:
space:
mode:
Diffstat (limited to 'buildstream/_frontend/app.py')
-rw-r--r--buildstream/_frontend/app.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/buildstream/_frontend/app.py b/buildstream/_frontend/app.py
index 3bcb0d962..4c98a2c05 100644
--- a/buildstream/_frontend/app.py
+++ b/buildstream/_frontend/app.py
@@ -540,15 +540,22 @@ class App():
#
# Args:
# target (Element): The element to reset the workspace for
+ # soft (bool): Only reset workspace state
# track (bool): Whether to also track the source
#
- def reset_workspace(self, target, track):
+ def reset_workspace(self, target, soft, track):
workspace = self.project.workspaces.get_workspace(target.name)
if workspace is None:
raise AppError("Workspace '{}' is currently not defined"
.format(target.name))
+ if soft:
+ workspace.prepared = False
+ self.project.workspaces.save_config()
+ self._message(MessageType.INFO, "Saved workspace configuration")
+ return
+
self.close_workspace(target.name, True)
self.open_workspace(target, workspace.path, False, track, False)