31 Commits

Author SHA1 Message Date
kenden
ee9918957c
Document how to update when changing a multiselect base answer (#1781)
* Document how to update when changing a multiselect base answer

The documentation to update, changing only one answer  when the question is a multi-select base choice, is missing.

This is from https://github.com/copier-org/copier/issues/1474#issuecomment-2328522026, but it also indicate to create the `.yaml` file in another directory (to avoid error `Destination repository is dirty; cannot continue. Please commit or stash your local changes and retry.`).

* style: autoformat with pre-commit

* docs: adapt to global copywriting style

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Jairo Llopis <973709+yajo@users.noreply.github.com>
2024-09-22 07:33:20 +00:00
jeanluc
5ac93ee199
fix(updating): do not recreate deleted paths on update (#1719)
Previously, paths that matched a pattern in `skip_if_exists` and that were deleted in the generated project were recreated during each update. This was expected, because the file now didn't exist, and thus it's considered new. However, it might be surprising to some, so docs are updated and a test now makes that an officially supported use case.

For the rest of files, they shouldn't be recreated, even if the template changed. A user that deletes the file is kind of expressing their will to ignore that file from now on. To recover it, they can just recopy the template.

BREAKING CHANGE: If you delete a file in your subproject, it will not be recreated if it changes in the template and you update the subproject. Recopy if you need it back.
2024-08-17 08:44:09 +02:00
Peter Bittner
b8ad16da35
docs: fix ineffective escaping, emphasize error messages (#1671) 2024-06-21 19:42:59 +02:00
Peter Bittner
b581d8d635
docs: add information on aborting an update (#1668) 2024-06-21 11:50:30 +00:00
Rémi Ferrand
73b51448ca
docs: fix pre-commit update rule for .rej files (#1600) 2024-04-22 15:35:15 +02:00
Rambaud Pierrick
ee5c106164
docs: improve updating pre-commit documentation (#1361)
- there was a inconsistence between the inline and rej default. as it's inline I changed the value in the corrected section
- as users won't need the 2 options at once, I split the 2 hooks.
- specified that both repos can be used at once

Co-authored-by: Sigurd Spieckermann <2206639+sisp@users.noreply.github.com>
2024-01-15 18:43:31 +00:00
Sigurd Spieckermann
53aab1f335 docs: prefer "questionnaire" over "questionary" 2023-12-01 08:54:17 +00:00
Zhiliang
f8614fc96f
docs: add uses cases for updating a project (#1336) 2023-10-01 08:18:38 +01:00
Sigurd Spieckermann
d8a667a462 docs: update outdated copier update --force examples 2023-08-28 13:57:16 +02:00
Sigurd Spieckermann
a75066e34c docs: use autorefs for section references 2023-08-05 20:33:57 +02:00
Jairo Llopis
0c5a6ca2b4
docs: clarify how to use recopy to recover from broken updates
Docs were a bit repetitive and unclear.

Targets https://github.com/copier-org/copier/issues/1170. It could even fix it?

Co-authored-by: Timothée Mazzucotelli <pawamoy@pm.me>
Co-authored-by: Sigurd Spieckermann <2206639+sisp@users.noreply.github.com>
2023-07-08 10:53:14 +02:00
Colin Marquardt
693d95896c Fix template vs destination folder mixup 2023-06-25 07:59:45 +01:00
Sigurd Spieckermann
1b351bc856 docs: update CLI usage examples to conform with v8
All CLI calls must use a subcommand as the first argument and all flags
must come after the subcommand. See #1143.
2023-06-15 17:17:05 +01:00
Jairo Llopis
070527e9b7 docs: clarify new update and overwrite behaviors 2023-05-30 07:34:22 +01:00
Jairo Llopis
2c5ff9e9b7 refactor(update): default to inline markers and 3 lines of context
Now that the inline mode is out of experimental, it turns out to provide a better default behavior than the good old rej mode. Mostly when context is increased to 3 lines or more.

BREAKING CHANGE: The default update conflict mode is now `inline` instead of `rej`.

BREAKING CHANGE: By default, updates now consider 3 lines of context instead of just 1.
2023-05-17 11:56:13 +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
Sigurd Spieckermann
3d211e1dae docs(updating): fix typos/punctuation/grammar 2023-01-25 07:26:18 +00:00
Barry Hart
504301c28e
feat: experimental inline conflict markers when updating
Fixes #613 

Based on #627, but:

* Supports both old (`.rej` files) and new (inline markers) conflict behavior

* Update a test to test both rej and inline conflict resolution

* Update some tests to explicitly specify "rej" conflict mode

* Add documentation for the two conflict modes

* keeping only 3-way merge

Co-authored-by: Oleh Prypin <oprypin@users.noreply.github.com>
Co-authored-by:
Thierry Guillemot <tguillemot@users.noreply.github.com>
Co-authored-by: Barry Hart <barry.hart@zoro.com>
Co-authored-by: Jairo Llopis <yajo.sk8@gmail.com>
Co-authored-by: Timothée Mazzucotelli <pawamoy@pm.me>
2022-11-14 05:09:23 +00:00
Sigurd Spieckermann
e682269cd5 docs: unify shell code blocks 2022-09-09 16:05:20 +01:00
Sigurd Spieckermann
befe8c5ea5 docs: always use ordered list marker "1." 2022-09-09 16:04:20 +01:00
Sigurd Spieckermann
fc6bb03a6d docs: fix spelling 2022-08-26 09:47:49 +01:00
Kian-Meng Ang
4684c78b5b Fix typos 2022-05-03 11:54:59 +08:00
Timothée Mazzucotelli
d2f5998b51
docs: Change diagram colors when switching between dark and light themes (#544) 2022-01-18 15:57:17 +01:00
Timothée Mazzucotelli
1afbae1181 docs: Add titles to code blocks where relevant 2022-01-13 21:35:11 +01:00
Jairo Llopis
2fe3072d6d docs: migration strategies across major copier versions
Try to answer a good question: when you upgrade one subproject from template v1 to v2, the template itself needs to be properly rendered in v1 to be compared to the subproject and extract the diff... well, we all know this at this point. But if Copier 6 renders differently the template v1 as compared to how Copier 5 would, then the template developer is on big trouble: How to evolve a subproject from a Copier v5-only template to a Copier v6-only template?

Fix https://github.com/copier-org/copier/issues/348
2021-07-17 08:37:30 +01:00
Jairo Llopis
054b962d70 docs: enable mermaid code fences 2021-04-20 07:21:36 +01:00
Jairo Llopis
c7b9f21f83 Advise users to never edit manually the copier answers file
This keeps happening once and again, and confuses users.

Let's clarify it here in the docs.

I also fix some broken links and update deps BTW.
2020-12-18 10:09:46 +00:00
Jairo Llopis
dfb7688910 Explain how to use multiple templates for the same project
This is very cool and it doesn't seem to be clearly explained anywhere.
2020-10-17 11:20:37 +00:00
Timothée Mazzucotelli
9e3f151eec Document the update process
Co-authored-by: Jairo Llopis <Yajo@users.noreply.github.com>
2020-09-27 22:21:21 +02:00
Jairo Llopis
cdb563a96d Add 4-space indentation to .md files
Mkdocs uses `python-markdown`, and [they say](https://python-markdown.github.io/#differences):

> The syntax rules clearly state that when a list item consists of multiple paragraphs, “each subsequent paragraph in a list item must be indented by either 4 spaces or one tab” (emphasis added). However, many implementations do not enforce this rule and allow less than 4 spaces of indentation. The implementers of Python-Markdown consider it a bug to not enforce this rule.

As we were using 2 spaces for markdown files (which looks better in source code), some indented lists were not displaying properly in the docs page.

Thus I change the setting to 4 spaces. Prettier will now enforce them, and mkdocs will display things properly.
2020-08-10 12:59:07 +00:00
Timothée Mazzucotelli
3ad2c67a20 Autodoc 2020-07-31 15:02:58 +02:00