Skip to content

Commit d0b4f12

Browse files
committed
Fix merge conflicts on uv migration tasks
Running the migration task to move to uv caused nasty merge conflicts. I reported this upstream[1], which showed the workaround used here. Eventually, we'll get a proper solution[2], but for now, "git add" [1]: https://github.com/orgs/copier-org/discussions/2612 [2]: copier-org/copier#2376
1 parent 72fc830 commit d0b4f12

2 files changed

Lines changed: 10 additions & 8 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ templating versions are not perfect matches for semantic versions.
1010

1111
- Support for python 3.14, changing default version to 3.13
1212

13+
### Fixed
14+
15+
- Running the uv migration task no longer causes nasty merge conflicts.
16+
Using [a workaround](https://github.com/orgs/copier-org/discussions/2612#discussioncomment-16544812),
17+
awaiting proper solution upstream ([draft PR](https://github.com/copier-org/copier/pull/2376))
18+
1319
## v2.0.0a26 - 2026-04-12
1420

1521
### Added

copier.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,7 @@ _skip_if_exists:
66
- CHANGELOG.md
77
- README.md
88
- docs/source/index.md
9-
# pyproject.toml is updated via migration task = excluded
10-
# But only in updates from v1 to v2 = migration poetry -> uv
11-
# FIXME: Refine the filter for excluding pyproject.toml ONLY on update AND when moving from v1 to v2 of template (other cases should be empty)
12-
- "{% if _copier_operation == 'update' -%}pyproject.toml{% endif %}"
13-
14-
# and _copier_answers._commit.startswith('v1')
15-
# # Tasks (git init + commit + tag) interfere with the update process!
9+
# NOTE: Tasks (git init + commit + tag) interfere with the update process!
1610
_tasks:
1711
- when: "{{ _copier_operation == 'copy' }}"
1812
command: >-
@@ -23,8 +17,10 @@ _tasks:
2317
{{_copier_conf.src_path}}/hooks/git_init_project
2418
_migrations:
2519
- version: v2.0.0a8
26-
command: cat pyproject.toml && uvx migrate-to-uv && uv lock && cat pyproject.toml
20+
# HACK: "Git add" avoids https://github.com/orgs/copier-org/discussions/2612#discussioncomment-16544812
21+
command: uvx migrate-to-uv && uv lock && git add pyproject.toml uv.lock
2722
when: "{{ _stage == 'before' }}"
23+
2824
project_name:
2925
type: str
3026
help: "What is your project name? (format: Capitalized With Spaces)"

0 commit comments

Comments
 (0)