diff options
author | Angelos Evripiotis <jevripiotis@bloomberg.net> | 2019-02-05 15:26:58 +0000 |
---|---|---|
committer | Angelos Evripiotis <angelos.evripiotis@gmail.com> | 2019-02-15 13:56:48 +0000 |
commit | c24f2971db15c8ef23fb569f9ee204ade643ec14 (patch) | |
tree | 8f166ae80ebb2ad6280dd54b47ddcb5d6f75f656 /buildstream/_context.py | |
parent | 0921ccf40f167ed524a1a2ff7023949f2542e14f (diff) | |
download | buildstream-c24f2971db15c8ef23fb569f9ee204ade643ec14.tar.gz |
userconfig: rm really-workspace-close-project-inaccessibleare_you_sure2
Remove the need for the 'really-workspace-close-project-inaccessible'
config option, as well as the option itself.
As agreed on the mailing list [1], all the 'are you sure?' prompts on
workspace reset and close were removed. While that discussion was going
on, this new prompt and option was added. At the 2019 BuildStream
Gathering, it was verbally agreed between myself and Tristan VB that we
would also remove this instance.
It was also agreed that we should have a notice to let the user know
what they'd done, this was already in place if interactive. Moved it to
be unconditional so that there's no difference in non-interactive
behaviour. Made it output to stderr, as it's diagnostic meant for the
user. Made it the last thing echo'd so it's next to the prompt - it's
very relevant to what they type next. Added a test to make sure the text
makes it to stderr in the appropriate case, and not in an inappropriate
one.
This is the last instance of any prompt configuration, so BuildStream
can also forget all of that machinery.
[1] https://mail.gnome.org/archives/buildstream-list/2018-December/msg00111.html
Diffstat (limited to 'buildstream/_context.py')
-rw-r--r-- | buildstream/_context.py | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/buildstream/_context.py b/buildstream/_context.py index 6fe7c3f52..2fbf415fb 100644 --- a/buildstream/_context.py +++ b/buildstream/_context.py @@ -124,10 +124,6 @@ class Context(): # Whether or not to cache build trees on artifact creation self.cache_buildtrees = None - # Boolean, whether we double-check with the user that they meant to - # close the workspace when they're using it to access the project. - self.prompt_workspace_close_project_inaccessible = None - # Whether elements must be rebuilt when their dependencies have changed self._strict_build_plan = None @@ -248,22 +244,6 @@ class Context(): self.sched_pushers = _yaml.node_get(scheduler, int, 'pushers') self.sched_network_retries = _yaml.node_get(scheduler, int, 'network-retries') - # Load prompt preferences - # - # We convert string options to booleans here, so we can be both user - # and coder-friendly. The string options are worded to match the - # responses the user would give at the cli, for least surprise. The - # booleans are converted here because it's easiest to eyeball that the - # strings are right. - # - prompt = _yaml.node_get( - defaults, Mapping, 'prompt') - _yaml.node_validate(prompt, [ - 'really-workspace-close-project-inaccessible', - ]) - self.prompt_workspace_close_project_inaccessible = _node_get_option_str( - prompt, 'really-workspace-close-project-inaccessible', ['ask', 'yes']) == 'ask' - # Load per-projects overrides self._project_overrides = _yaml.node_get(defaults, Mapping, 'projects', default_value={}) |