Ports TG's icon merge conflict tool - #38821
Conversation
|
need to verify CI |
|
will straighten this out this weekend, been busy |
|
fucking |
It does actually work (or at least did in 2024), but you have to set it up manually on your own end. I wouldn't necessarily trust it in complex cases, either. A newer tool is certainly a good thing. |
|
|
||
| # dmi icon merger hook | ||
| # needs additional setup, see tools/dmitool/merging.txt | ||
| # Run tools/dmi/Resolve Icon Conflicts.bat after a conflicted merge |
There was a problem hiding this comment.
Why remove the instructions to set it up properly instead of just updating them?
There was a problem hiding this comment.
my bad - I was under the impression the old tools didn't work and that this would be a full replacement.
given my grand plan to integrate this into the CI looks like it isn't going to work i'm going to re-do this as an alternative to the java tool
|
i will reopen this when i get back to it, fed up of seeing it on the pr list |
What this does
Many years ago, someone called DrCelt ported a dmi conflict resolver from Bay (
tools/dmitool). This resolver was written in Java but doesn't seem to work any more or be used. And you have to install Java to use it.TG has a more modern version of something very similar written in Python. This PR ports most of that tool and makes a couple of changes.
The tool itself works like this:
The TG way of running it via git hooks is currently not implemented here. Maybe it'll be added, let's see if we need it - it requires developers to run an extra step one time to set the hook up, but the benefit is that the conflict resolution script runs automatically when you pull/merge to local. If it's a trivial conflict then its very hands-off, if its nontrivial you need to resolve it manually in a dmi editor.
If you don't have the hook set up, i.e. how this branch is set up right now, when you pull/merge and your git detects a dmi conflict you run
tools/dmi/Resolve Icon Conflicts.bat. This sets up a Python venv if not already done then does the above check, giving you feedback on what to do next.In addition, something I don't think TG has right now, this tool will also run as part of the CI. When you open a PR and the CI detects an icon conflict, it will run the tool and detect if its a trivial conflict or not. It will then post a comment in the PR that explains what to do next. Until DMI conflicts are resolved, the CI will fail.
Why it's good
Less agony for developers working on sprites, less awkward workaround when resolving icon conflicts
How it was tested
Changelog
No user-facing change