Closed nchal closed 1 year ago
Created files are in my filesystem
So they're not deleted?
If Git only shows you unstaged changes, while the new files are there, I guess it means they're already tracked? Seems a like a Git issue more than a Copier one to me.
Are your repository and template public, so that I can take a look?
Hi, thx for ur answer
I'm pretty sure that git is ok, because since I don't use --override, I can see the files being created by copier step by step and then being delete as soon as the cmd ends
and then being delete as soon as the cmd ends
Oh, OK, I thought you were saying that the files were there, in the file system, after the command ended.
Does your template use a task that could delete these files? By running a git
or rm
command for example?
It's hard to help without a reproducible example.
there is no tasks in my copier.yml 😢
and i don't know how to explain this better than that... when I update my project, just before the execution end, some changes seems to be deleted (even if it says created). The current workaround is to avoid using --force and git adding during execution pausing (when it asks for overwrite confirmation)
as u can see, git says : new changes are deletion of the newly created files :
Please share your repository URL if you're allowed to, or provide us with a reproducible example. We won't be able to help otherwise :/
Check that you didn't previously commit the deletion of these files. Copier would reapply the deletion after each update, explaining this behavior.
Look like copier just apply the difference between your 2 copier version.
I'm not sure to understand how copying works
Let's imagine this case: I have my project in copy version 1.5 (version specified in my .copier-version) but with a "toto" folder that differs from 1.5 (because I didn't want to apply the modifications). I run my copy update, which triggers the latest version, say 1.6.
What's going to happen?
Copier merges both your changes and the template changes. If it cannot merge them, you get conflict markers in your files, that you can resolve yourself. There's a diagram here: https://copier.readthedocs.io/en/stable/updating/#how-the-update-works
Thank you So, that's the option 1. Copier will update "toto" folder
I can see the files being created by copier step by step
In updates, sometimes this list is misleading. See #1156. Is this what was confusing you?
I've try something.
My .copier-version is v4.0.0-beta.21
If i run :
copier --force --vcs-ref v4.0.0-beta.23 update
I've only difference between v4.0.0-beta.22
to v4.0.0-beta.23
and i've not modification from v4.0.0-beta.21
to v4.0.0-beta.22
.
I need to run command to every command to have all modification.
It's possible to get all the changes when I skip a version
And I think @nchal have this problem too.
He see all modification comes but modification that doesn't come from last copier skeleton version, so this file seems to be deleted
I need to run command to every command to have all modification.
That is not how Copier works, so I doubt that's what happens.
As always, without a clear reproduction of the issue we can only guess.
Hi there.
Thanks for your report, but it's lacking enough information and it cannot be fixed until it's provided. I close it for that reason.
If you provide the requested information later, please reopen it.
Thank you!
Describe the problem
After doing a copier update, I cannot commit the incoming changes because the files seems to be deleted
Template
To Reproduce
copier --vcs-ref=ci/test_remove_copier_task update
Logs
Expected behavior
Created files are in my filesystem
BUT the git status show me this
Screenshots/screencasts/logs
No response
Operating system
Linux
Operating system distribution and version
Ubuntu 20.04
Copier version
copier 7.0.1
Python version
Python 3.8.10
Installation method
pipx+pypi
Additional context
No response