11 Commits

Author SHA1 Message Date
danieleades
1c2f8d8b08
style: use pathlib 2025-02-26 17:42:21 +01:00
Jairo Llopis
fd23923b5c
style(ruff-format): enable and reformat Python files
Until now, only linting was enabled. My failure.

I added this setting to widen the code style automation. I also enabled [keep-runtime-typing](https://docs.astral.sh/ruff/settings/#lint_pyupgrade_keep-runtime-typing) because we use Pydantic.

Finally, I executed the new formatting over all the project.
2024-12-03 13:59:00 +01:00
Tom C (DLS)
558f51cda7
fix: restore support for preserve_symlinks: false for directories (#1820) 2024-10-16 18:42:45 +02:00
Sigurd Spieckermann
3c39738325 refactor: drop support for Python 3.8 2024-10-13 13:24:11 +01:00
Sigurd Spieckermann
0258635da7 fix: support Git config without user identity 2024-07-30 13:40:17 +02:00
Adrian Freund
f5ff0b35db
fix: don't crash when update replaces file with symlink (or vice versa) (#1409)
Previously if an update would try to replace a file with a symlink
copier would crash. If an update tried to replace a symlink with a file
it would just overwrite the symlink target. Now both cases work as
expected.
2023-11-15 13:12:13 +00:00
Sigurd Spieckermann
bc1dfc0419 build(typing): add missing type hints 2023-10-01 07:43:04 +01:00
Sigurd Spieckermann
10fef1bcf9 style: prefer imports from modules 2023-07-17 13:55:51 +02:00
Jairo Llopis
6996b9cc7a feat: add recopy command and function
This new command allows to reapply a template, keeping old answers but discarding subproject evolution.

It is useful when there are bugs replaying an old version of the template, or when the subproject has drifted too much from the template and you need to reset it.

BREAKING CHANGE: All CLI calls to Copier must now include the subcommand as the 1st argument. For example, `copier` must become now `copier update`; also `copier ./tpl ./dst` must become `copier copy ./tpl ./dst`.

BREAKING CHANGE: All flags must go after the subcommand now. For example, `copier -r HEAD update ./dst` must now become `copier update -r HEAD ./dst` or `copier update ./dst -r HEAD`.

BREAKING CHANGE: Automatic mode removed. Since now subcommands are required, the automatic mode is removed.

BREAKING CHANGE: Deprecated `copier.copy` function is removed. Use `copier.run_copy`, `copier.run_update` or `copier.run_recopy` explicitly as needed.

Fix https://github.com/copier-org/copier/issues/1081
Close https://github.com/copier-org/copier/issues/1082
2023-05-17 11:56:13 +01:00
Jairo Llopis
970c962562 fix: preserver recursive symlinks
Infinite recursion problem solved.

Fixes https://github.com/copier-org/copier/issues/1091.
2023-05-14 08:51:24 +01:00
Adrian Freund
0f610be801
feat: support preserving symlinks when copying templates (#938)
* feat: Preserve symlinks when copying templates

* test: Add tests for symlink copying
2023-04-07 08:03:17 +01:00