summaryrefslogtreecommitdiff
path: root/src/buildstream/_workspaces.py
diff options
context:
space:
mode:
authorDarius Makovsky <traveltissues@protonmail.com>2020-01-13 09:06:11 +0000
committerJürg Billeter <j@bitron.ch>2020-02-11 21:08:59 +0100
commit1ee61a88bf0e3cbb0395153c681124990004e4ca (patch)
treeda47586dae6f3bb7bb16a239d25bd5c81ce95fb4 /src/buildstream/_workspaces.py
parent04c00da690bce67bd937a71dce5d84a338a0521f (diff)
downloadbuildstream-1ee61a88bf0e3cbb0395153c681124990004e4ca.tar.gz
_workspaces: Rename `last_successful` to `last_build`
The new incremental build approach uses the buildtree from the last build (successful or not) and no longer needs to know any information about the last successful build.
Diffstat (limited to 'src/buildstream/_workspaces.py')
-rw-r--r--src/buildstream/_workspaces.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/buildstream/_workspaces.py b/src/buildstream/_workspaces.py
index 1057e8521..a54a17ff1 100644
--- a/src/buildstream/_workspaces.py
+++ b/src/buildstream/_workspaces.py
@@ -232,18 +232,18 @@ class WorkspaceProjectCache:
# An object to contain various helper functions and data required for
# workspaces.
#
-# last_successful and path are intended to be public
+# last_build and path are intended to be public
# properties, but may be best accessed using this classes' helper
# methods.
#
# Args:
# toplevel_project (Project): Top project. Will be used for resolving relative workspace paths.
# path (str): The path that should host this workspace
-# last_successful (str): The key of the last successful build of this workspace
+# last_build (str): The key of the last attempted build of this workspace
#
class Workspace:
- def __init__(self, toplevel_project, *, last_successful=None, path=None):
- self.last_successful = last_successful
+ def __init__(self, toplevel_project, *, last_build=None, path=None):
+ self.last_build = last_build
self._path = path
self._toplevel_project = toplevel_project
@@ -258,8 +258,8 @@ class Workspace:
#
def to_dict(self):
ret = {"path": self._path}
- if self.last_successful is not None:
- ret["last_successful"] = self.last_successful
+ if self.last_build is not None:
+ ret["last_build"] = self.last_build
return ret
# from_dict():
@@ -516,7 +516,7 @@ class Workspaces:
def _load_workspace(self, node):
dictionary = {
"path": node.get_str("path"),
- "last_successful": node.get_str("last_successful", default=None),
+ "last_build": node.get_str("last_build", default=None),
}
return Workspace.from_dict(self._toplevel_project, dictionary)