11 Commits

Author SHA1 Message Date
Sigurd Spieckermann
ef5ea4b212 refactor: rename internal modules with a _ prefix 2025-04-22 13:52:51 +02:00
danieleades
1c2f8d8b08
style: use pathlib 2025-02-26 17:42:21 +01:00
Sigurd Spieckermann
0258635da7 fix: support Git config without user identity 2024-07-30 13:40:17 +02:00
danieleades
0c6b0b96fe
build(typing): enable 'strict' mypy linting (#1527)
---------

Co-authored-by: Timothée Mazzucotelli <dev@pawamoy.fr>
2024-03-23 12:58:20 +01:00
Axel H
37391820ad
fix(vcs): prevent local clone from being stuck by gpg prompts (#1360)
A quick and simple PR preventing the `copy` command to get stuck if you have `commit.gpgSign` and try to run the `copy` command on WIP local project for trial.

Fixes #856
Fixes #1224
Fixes #616

Co-authored-by: Jairo Llopis <yajo.sk8@gmail.com>
2023-10-22 13:20:43 +00:00
Sigurd Spieckermann
a82c0ad6bf
refactor: drop support for Python 3.7 (#1252) 2023-07-18 19:59:05 +01: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
e34bcda48b fix: include dirty local changes when copying HEAD
This was the intended and documented behavior, but at some point it got broken.

Well, now it's tested and it works.

Besides, there's a new FAQ to avoid further surprises.

Fixes https://github.com/copier-org/copier/issues/787
2023-04-07 11:55:59 +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
Sigurd Spieckermann
5029b6e7a9
test: add type hints and clean up (#985)
* refactor(tests): add type hints and clean up

* fix: import `Protocol` from `typing-extensions` when using Python 3.7

* fix: import `Literal` from `typing-extensions` when using Python 3.7

* refactor(tests): create template and subproject directory using `tmp_path_factory` fixture

* refactor(tests): use OS-agnostic file path separator

* refactor(tests): use `/` separator for `skip_if_exists` paths

* style: fix formatting error

* refactor(tests): expect POSIX path for local repo URL
2023-03-21 16:31:11 +00:00
Sabar Dasgupta
6cc94c6ad1
feat: include local dirty changes by default (#520)
- if a template is vcs-tracked and dirty, the changes are committed automatically with a "wip" commit and propagated to the subproject
- user is warned in this scenario
- tests for copy and update on dirty templates

fixes #184
2022-01-11 20:07:14 +01:00