Make sure your path is correct, and you should probably make it absolute. I’ll choose the latter, so open ~/.subversion/config and add a line under the section like this: merge-tool-cmd = /scripts/diffmerge/diffmerge-svnmerge.sh To do so, we can either set the SVN_MERGE environment variable to point to the path to the script or edit our subversion config file. Now, we need to get subversion to call this script at the right time. These are briefly described in a paragraph in here. I’m using this, and placing it in my home directory: ~/scripts/diffmerge/diffmerge-svnmerge.sh: #!/bin/bashĭIFFMERGE_PATH=/Applications/DiffMerge/DiffMerge.appĭIFFMERGE_EXEC=$ -nosplash -m -t1="Incoming Merge Changes" -t2="Original (merged)" -t3="Current Working Copy changes" -r="$4" "$2" "$1" "$3"Īs noted in the comments, svn will call this wrapper script with arguments. Next, you’ll need a little wrapper shell script to invoke DiffMerge from svn. Once you’ve downloaded the diskimage file, open it and you’ll see a DiffMerge.app directory. There’s some info in the manual, notably here and hereįirst, download diffmerge. I’ve always found merging a bit confusing, and to make matters worse, it’s not altogether straightforward as to how one gets SVN to use external merge tools. I settled on trying Diffmerge: it was free, available on mac (and windows and linux) and seemed pretty feature rich. I looked around and found several merge tools. The time had come to start using a more graphical merge tool with svn. Since it wasn’t my code that conflicted and there were alot of conflicts over many, long lines, looking at svn’s diff output made me a bit confused and dizzy. Recently for a project, I had to merge some code into our main trunk in svn from a maintenance branch and ran into bunch of problems due to merge conflicts. I’m not a fan of conflicts, especially source control merge conflicts.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |