Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggested improvements to the update process #877

Closed
adamcunnington-mlg opened this issue Nov 23, 2022 · 5 comments
Closed

Suggested improvements to the update process #877

adamcunnington-mlg opened this issue Nov 23, 2022 · 5 comments

Comments

@adamcunnington-mlg
Copy link

Unless I am misunderstanding the intended use of the update process, I think that there might be 3 missing features which would really improve the update experience:

  1. When prompted to overwrite a file, instead of just [Y/n] options, have [Y/n/v] where v is for view and it prints out the diff and then prompts the [Y/n/v] again. cruft update works in this way and it's nice
  2. Provide an option to skip tasks. In my case, the tasks do freezing of requirements and installation. I don't want to do this during most updates - especially as the tasks get run twice during an update
  3. Default to correct Y/n during overwrite prompts. Currently, it defaults to yes but this default should be i) indicated e.g. emboldened/coloured and ii) False if the file has not changed more recently in the template source. This feels like the most significant point to me - if my destination has made changes to a file, I don't want to overwrite those changes with the template version - I must be misunderstanding what is happening here because this feels fundamental

Thanks for the consideration / your time in responding to these.

@pawamoy
Copy link
Contributor

pawamoy commented Nov 23, 2022

if my destination has made changes to a file, I don't want to overwrite those changes with the template version - I must be misunderstanding what is happening here because this feels fundamental

Indeed it can be counter-intuitive, but this "overwrite" does not mean you lose your local changes, as they will be re-applied after the local files have been updated.

I believe all these (valid) points are covered by the plans @yajo already has, namely to entirely remove this "overwrite prompt" feature, and to allow finer-grained execution of tasks.

@adamcunnington-mlg
Copy link
Author

Ok, great news, thanks for that.

There is probably also a way to avoid this double execution of a lot of the workload that happens during an update - but great to know something is in development - are there any more details on what is expected and when? Just to manage my expectations and excitement! Loving copier so far.

Thanks

@pawamoy
Copy link
Contributor

pawamoy commented Nov 23, 2022

You can follow the task issue here: #240.
The suggestion to remove the overwrite prompts was mentioned here: #562 (comment), and leads to this PR that was merged: #807. So I think we're one release away from it?

@adamcunnington-mlg
Copy link
Author

Thanks @pawamoy, I'll do that and I'll close this issue, thank you.

@yajo
Copy link
Member

yajo commented Nov 25, 2022

Well, #807 is a bit a different story. It's about having inline merge conflict markers. However it paves the way to not need overwrite prompts anymore too.

I maintain Copier in my free time. I try to commit some hours to it like about once every 2 weeks. Right now I'm focused on finishing #585 before the next release. But as you can guess, there's no real schedule. Help is always appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants