drupalorg-cli
drupalorg-cli copied to clipboard
Merge conflicts when applying an updated patch
I am reviewing Move memory management from MigrateExecutable to an event subscriber and previously applied the patch from Comment 58. When I tried to apply the patch from Comment 61, I got these merge conflicts:
$ drupalorg issue:apply 3006750
Creating issue branch for 9.1.x
The branch 3006750-move_memory_manageme exists! Checking it out
Creating temp branch 3006750-move_memory_manageme-patch-temp
Committing move_memory_manageme.patch
Checking out 3006750-move_memory_manageme and merging
Failed to apply the patch
Auto-merging core/modules/migrate/tests/src/Unit/TestMigrateExecutable.php
Auto-merging core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php
CONFLICT (modify/delete): core/modules/migrate/tests/src/Unit/MigrateExecutableMemoryExceededTest.php deleted in 3006750-move_memory_manageme-patch-temp and modified in HEAD. Version HEAD of core/modules/migrate/tests/src/Unit/MigrateExecutableMemoryExceededTest.php left in tree.
CONFLICT (add/add): Merge conflict in core/modules/migrate/src/MemoryManagerInterface.php
Auto-merging core/modules/migrate/src/MemoryManagerInterface.php
Automatic merge failed; fix conflicts and then commit the result.
I understand the modify/delete conflict. I am mystified by the add/add conflict, since the new file is identical in the two patches.
It is probably a bad idea to try to handle merge conflicts automatically. Maybe an error message with suggested next steps would help, or some options to the issue:apply
command.
The add/add conflict does not show up, and there are no conflict markers in that file:
$ git status
On branch 3006750-move_memory_manageme
You have unmerged paths.
(fix conflicts and run "git commit")
(use "git merge --abort" to abort the merge)
Changes to be committed:
modified: core/modules/migrate/src/MemoryManagerInterface.php
new file: core/modules/migrate/tests/src/Unit/MemoryManagerTest.php
modified: core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php
modified: core/modules/migrate/tests/src/Unit/TestMigrateExecutable.php
Unmerged paths:
(use "git add/rm <file>..." as appropriate to mark resolution)
deleted by them: core/modules/migrate/tests/src/Unit/MigrateExecutableMemoryExceededTest.php