mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-09 16:12:17 +00:00
Automatic DMI merge stuff
This commit is contained in:
4
.gitattributes
vendored
4
.gitattributes
vendored
@@ -2,5 +2,9 @@
|
||||
# needs additional setup, see tools/mapmerge/install.txt
|
||||
*.dmm merge=merge-dmm
|
||||
|
||||
# dmi icon merger hook
|
||||
# needs additional setup, see tools/dmitool/merging.txt
|
||||
*.dmi merge=merge-dmi
|
||||
|
||||
# force changelog merging to use union
|
||||
html/changelog.html merge=union
|
||||
|
||||
8
tools/dmitool/dmimerge.sh
Normal file
8
tools/dmitool/dmimerge.sh
Normal file
@@ -0,0 +1,8 @@
|
||||
java -jar tools/dmitool/dmitool.jar merge $1 $2 $3 $2
|
||||
if [ "$?" -gt 0 ]
|
||||
then
|
||||
echo "Unable to automatically resolve all icon_state conflicts, please merge manually."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit 0
|
||||
12
tools/dmitool/merging.txt
Normal file
12
tools/dmitool/merging.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
1. Install java(http://www.java.com/en/download/index.jsp)
|
||||
2. Make sure java is in your PATH. To test this, open git bash, and type "java". If it says unknown command, you need to add JAVA/bin to your PATH variable (A guide for this can be found at https://www.java.com/en/download/help/path.xml ).
|
||||
|
||||
Merging
|
||||
The easiest way to do merging is to install the merge driver. For this, open `Baystation12/.git/config` in a text editor, and paste the following lines to the end of it:
|
||||
|
||||
[merge "merge-dmi"]
|
||||
name = iconfile merge driver
|
||||
driver = ./tools/dmitool/dmimerge.sh %O %A %B
|
||||
|
||||
After this, merging DMI files should happen automagically unless there are conflicts (an icon_state that both you and someone else changed).
|
||||
If there are conflicts, you will unfortunately still be stuck with opening both versions in the editor, and manually resolving the issues with those states.
|
||||
Reference in New Issue
Block a user