Automatic DMI merge stuff

This commit is contained in:
GinjaNinja32
2014-11-26 21:28:40 +00:00
parent a17cb4c7d2
commit 627626c49d
3 changed files with 24 additions and 0 deletions

4
.gitattributes vendored
View File

@@ -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

View 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
View 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.