Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • willsalmon/buildstream
  • CumHoleZH/buildstream
  • tchaik/buildstream
  • DCotyPortfolio/buildstream
  • jesusoctavioas/buildstream
  • patrickmmartin/buildstream
  • franred/buildstream
  • tintou/buildstream
  • alatiera/buildstream
  • martinblanchard/buildstream
  • neverdie22042524/buildstream
  • Mattlk13/buildstream
  • PServers/buildstream
  • phamnghia610909/buildstream
  • chiaratolentino/buildstream
  • eysz7-x-x/buildstream
  • kerrick1/buildstream
  • matthew-yates/buildstream
  • twofeathers/buildstream
  • mhadjimichael/buildstream
  • pointswaves/buildstream
  • Mr.JackWilson/buildstream
  • Tw3akG33k/buildstream
  • AlexFazakas/buildstream
  • eruidfkiy/buildstream
  • clamotion2/buildstream
  • nanonyme/buildstream
  • wickyjaaa/buildstream
  • nmanchev/buildstream
  • bojorquez.ja/buildstream
  • mostynb/buildstream
  • highpit74/buildstream
  • Demo112/buildstream
  • ba2014sheer/buildstream
  • tonimadrino/buildstream
  • usuario2o/buildstream
  • Angelika123456/buildstream
  • neo355/buildstream
  • corentin-ferlay/buildstream
  • coldtom/buildstream
  • wifitvbox81/buildstream
  • 358253885/buildstream
  • seanborg/buildstream
  • SotK/buildstream
  • DouglasWinship/buildstream
  • karansthr97/buildstream
  • louib/buildstream
  • bwh-ct/buildstream
  • robjh/buildstream
  • we88c0de/buildstream
  • zhengxian5555/buildstream
51 results
Show changes
Commits on Source (2)
  • Angelos Evripiotis's avatar
    BREAK:remove unconditional 'are you sure?' prompts · 86c8e414
    Angelos Evripiotis authored
    This is a breaking change, as it affects behaviour that people might be
    relying on. An entry has been added to NEWS.
    
    As proposed on the mailing list, this change removes the unconditional
    prompts on:
    
        o: bst workspace reset
        o: bst workspace close --remove-dir
    
    If interactive, these commands would always interrupt you with a prompt
    like this:
    
        This will remove all your changes, are you sure?
    
    This seems like it may just save someone's work some time. It may also
    condition folks to hit 'y' quickly without thinking.
    
    This change also makes the non-interactive behaviour consistent with the
    interactive behaviour in the default case. There is also the case of the
    prompt configured by 'really-workspace-close-project-inaccessible',
    which may be tackled in later work.
    
    This change also removes the new config options to suppress those
    prompts, and their associated news entry.
    
    The relevant bit of the mailing list conversation is here:
    https://mail.gnome.org/archives/buildstream-list/2018-December/msg00106.html
    
    The issue to make interactive and non-interactive behaviour consistent
    is here:
    #744
    86c8e414
  • Angelos Evripiotis's avatar
    Merge branch 'aevri/are_you_sure' into 'master' · aae35e13
    Angelos Evripiotis authored
    BREAK:remove unconditional 'are you sure?' prompts
    
    See merge request !1061
    aae35e13
......@@ -50,6 +50,11 @@ buildstream 1.3.1
an error message and a hint instead, to avoid bothering folks that just
made a mistake.
o BREAKING CHANGE: The unconditional 'Are you sure?' prompts have been
removed. These would always ask you if you were sure when running
'bst workspace close --remove-dir' or 'bst workspace reset'. They got in
the way too often.
o Failed builds are included in the cache as well.
`bst checkout` will provide anything in `%{install-root}`.
A build including cached fails will cause any dependant elements
......@@ -87,12 +92,6 @@ buildstream 1.3.1
instead of just a specially-formatted build-root with a `root` and `scratch`
subdirectory.
o The buildstream.conf file learned new
'prompt.really-workspace-close-remove-dir' and
'prompt.really-workspace-reset-hard' options. These allow users to suppress
certain confirmation prompts, e.g. double-checking that the user meant to
run the command as typed.
o Due to the element `build tree` being cached in the respective artifact their
size in some cases has significantly increased. In *most* cases the build trees
are not utilised when building targets, as such by default bst 'pull' & 'build'
......
......@@ -121,18 +121,10 @@ class Context():
# Whether or not to attempt to pull build trees globally
self.pull_buildtrees = None
# Boolean, whether we double-check with the user that they meant to
# remove a workspace directory.
self.prompt_workspace_close_remove_dir = 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
# Boolean, whether we double-check with the user that they meant to do
# a hard reset of a workspace, potentially losing changes.
self.prompt_workspace_reset_hard = None
# Whether elements must be rebuilt when their dependencies have changed
self._strict_build_plan = None
......@@ -260,16 +252,10 @@ class Context():
prompt = _yaml.node_get(
defaults, Mapping, 'prompt')
_yaml.node_validate(prompt, [
'really-workspace-close-remove-dir',
'really-workspace-close-project-inaccessible',
'really-workspace-reset-hard',
])
self.prompt_workspace_close_remove_dir = _node_get_option_str(
prompt, 'really-workspace-close-remove-dir', ['ask', 'yes']) == 'ask'
self.prompt_workspace_close_project_inaccessible = _node_get_option_str(
prompt, 'really-workspace-close-project-inaccessible', ['ask', 'yes']) == 'ask'
self.prompt_workspace_reset_hard = _node_get_option_str(
prompt, 'really-workspace-reset-hard', ['ask', 'yes']) == 'ask'
# Load per-projects overrides
self._project_overrides = _yaml.node_get(defaults, Mapping, 'projects', default_value={})
......
......@@ -841,11 +841,6 @@ def workspace_close(app, remove_dir, all_, elements):
if nonexisting:
raise AppError("Workspace does not exist", detail="\n".join(nonexisting))
if app.interactive and remove_dir and app.context.prompt_workspace_close_remove_dir:
if not click.confirm('This will remove all your changes, are you sure?'):
click.echo('Aborting', err=True)
sys.exit(-1)
for element_name in elements:
app.stream.workspace_close(element_name, remove_dir=remove_dir)
......@@ -879,11 +874,6 @@ def workspace_reset(app, soft, track_, all_, elements):
if all_ and not app.stream.workspace_exists():
raise AppError("No open workspaces to reset")
if app.interactive and not soft and app.context.prompt_workspace_reset_hard:
if not click.confirm('This will remove all your changes, are you sure?'):
click.echo('Aborting', err=True)
sys.exit(-1)
if all_:
elements = tuple(element_name for element_name, _ in app.context.get_workspaces().list())
......
......@@ -112,14 +112,6 @@ logging:
#
prompt:
# Whether to really proceed with 'bst workspace close --remove-dir' removing
# a workspace directory, potentially losing changes.
#
# ask - Ask the user if they are sure.
# yes - Always remove, without asking.
#
really-workspace-close-remove-dir: ask
# Whether to really proceed with 'bst workspace close' when doing so would
# stop them from running bst commands in this workspace.
#
......@@ -127,11 +119,3 @@ prompt:
# yes - Always close, without asking.
#
really-workspace-close-project-inaccessible: ask
# Whether to really proceed with 'bst workspace reset' doing a hard reset of
# a workspace, potentially losing changes.
#
# ask - Ask the user if they are sure.
# yes - Always hard reset, without asking.
#
really-workspace-reset-hard: ask