summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChandan Singh <csingh43@bloomberg.net>2018-01-18 13:54:10 +0000
committerJürg Billeter <j@bitron.ch>2018-01-25 11:52:48 +0000
commitcf7e4357fd7b7a4818a52718ac30de89fb3bfe72 (patch)
tree1b2fbb5bbadcbd60e1ca2bb0f1f8d897a3bf78b6
parent5f1be604603843bc266252cf5a3a91939d2c09f5 (diff)
downloadbuildstream-incremental-build.tar.gz
Raise warning if workspaced source's ref is updatedincremental-build
In case a source with an open workspace is tracked and it's ref gets updated, BuildStream should inform the user that the new ref will not be picked up so long as the workspace is open. To start using the updated ref, the existing workspace will have to be closed.
-rw-r--r--buildstream/source.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/buildstream/source.py b/buildstream/source.py
index 20d54ed47..c766322a8 100644
--- a/buildstream/source.py
+++ b/buildstream/source.py
@@ -417,6 +417,10 @@ class Source(Plugin):
if current_ref != new_ref:
self.info("Found new revision: {}".format(new_ref))
+ if self._has_workspace():
+ detail = "This source has an open workspace.\n" \
+ + "To start using the new reference, please close the existing workspace."
+ self.warn("Updated reference will be ingnored as source has open workspace", detail=detail)
return new_ref