<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Benjamin Halsted &#187; araxis merge</title>
	<atom:link href="http://benjaminhalsted.com/tag/araxis-merge/feed/" rel="self" type="application/rss+xml" />
	<link>http://benjaminhalsted.com</link>
	<description>// [bgh] todo, add something clever here.</description>
	<lastBuildDate>Wed, 01 Sep 2010 03:56:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Subversion loves Araxis Merge (or, How I finally configured subversion to use Araxis Merge in a not so stupid way.)</title>
		<link>http://benjaminhalsted.com/2010/03/subversion-lovesaraxis-merge-subversion/</link>
		<comments>http://benjaminhalsted.com/2010/03/subversion-lovesaraxis-merge-subversion/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 16:52:17 +0000</pubDate>
		<dc:creator>halzy</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[araxis merge]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://benjaminhalsted.com/?p=37</guid>
		<description><![CDATA[Araxis suggests modifying subversions diff-cmd and diff3-cmd settings to get it to use Araxis Merge instead of the defaults. Here is a snippet from their docs. (You can skip it, it's just here to make my post look bigger.):

Open your ‘SVN configuration area’ configuration file in a text editor. The default location for this file [...]]]></description>
			<content:encoded><![CDATA[<p>Araxis suggests modifying subversions diff-cmd and diff3-cmd settings to get it to use Araxis Merge instead of the defaults. Here is a snippet from their docs. (You can skip it, it's just here to make my post look bigger.):</p>
<blockquote>
<p style="text-align: left; max-width: 520px; white-space: normal; margin-top: 5px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px;">Open your ‘SVN configuration area’ configuration file in a text editor. The default location for this file is <em>~/.subversion</em>.</p>
<p style="text-align: left; max-width: 520px; white-space: normal; margin-top: 5px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px;">Uncomment the line that specifies the <code style="font-family: 'Courier New', Courier, monospace; white-space: normal; font-size: 12px;">diff-cmd</code> and set its value to the path of the Merge <em>araxissvndiff</em> executable that you have installed on your machine:</p>
<blockquote style="margin-top: 5px; margin-right: 2.5em; margin-bottom: 5px; margin-left: 2.5em; font-style: normal; text-align: left; max-width: 520px; white-space: normal;">
<pre style="font-family: 'Courier New', Courier, monospace; margin-top: 5px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; font-size: 12px;">diff-cmd = /Users/&lt;userid&gt;/bin/araxissvndiff</pre>
</blockquote>
<p style="text-align: left; max-width: 520px; white-space: normal; margin-top: 5px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px;">Note: in the above path, replace <em>/Users/&lt;userid&gt;/bin/araxissvndiff</em> with the full path to the Merge Merge <em>araxissvndiff</em> command-line utility that you have installed on your machine.</p>
<p style="text-align: left; max-width: 520px; white-space: normal; margin-top: 5px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px;">Also uncomment the line that specifies the <code style="font-family: 'Courier New', Courier, monospace; white-space: normal; font-size: 12px;">diff-cmd3</code> and set its value to the path of the Merge <em>araxissvndiff3</em> executable that you have installed on your machine:</p>
<blockquote style="margin-top: 5px; margin-right: 2.5em; margin-bottom: 5px; margin-left: 2.5em; font-style: normal; text-align: left; max-width: 520px; white-space: normal;">
<pre style="font-family: 'Courier New', Courier, monospace; margin-top: 5px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; font-size: 12px;">diff3-cmd = /Users/&lt;userid&gt;/bin/araxissvndiff3</pre>
</blockquote>
<p style="text-align: left; max-width: 520px; white-space: normal; margin-top: 5px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px;">Note: in the above path, replace <em>/Users/&lt;userid&gt;/bin/araxissvndiff3</em> with the full path to the Merge Merge <em>araxissvndiff3</em> command-line utility that you have installed on your machine.</p>
</blockquote>
<p style="text-align: left; max-width: 520px; white-space: normal; margin-top: 5px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px;">By doing what they say, you tell svn to use Araxis Merge every time it needs to merge a file. The problem with this is that svn will open Araxis Merge to make <strong>every</strong> merge. When you have a couple hundred files, you want svn to merge everything it can without opening Araxis Merge, and to only open it when there is a conflict. There is a way to do this, but it is not obvious.</p>
<p style="text-align: left; max-width: 520px; white-space: normal; margin-top: 5px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px;"><span id="more-37"></span></p>
<p style="text-align: left; max-width: 520px; white-space: normal; margin-top: 5px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px;">These instructions are specific to OSX, but should be enough of a hint for getting set up on any platform.</p>
<p style="text-align: left; max-width: 520px; white-space: normal; margin-top: 5px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px;">We need to create a shell script that we can use as a merge tool. It needs to be somewhere in your execution PATH. I've added ~/bin to my execution PATH and have put the script there, but you could put it in a directory that is already in your path, such as /usr/local/bin.</p>
<p>Here is the script, it is named araxishelper.sh:</p>
<blockquote>
<pre>#!/bin/sh

araxissvndiff3 $2 $1 $3 &gt; $4
exit $?</pre>
</blockquote>
<p>Make sure it's executable bit is set:</p>
<blockquote>
<pre>chmod +x araxishelper.sh</pre>
</blockquote>
<p>Now we need to configure subversion to use this new merge script. Edit your subversion configuration file ~/.subversion/config, and add the line:</p>
<pre>
<blockquote>
<pre>merge-tool-cmd = araxishelper.sh</pre>
</blockquote>
</pre>
<p>Thats it! Well, almost. If you try doing a merge now, nothing different happens. What gives? You have to tell subversion to use the merge-tool-cmd setting by adding '--accept launch' to your svn merge command.</p>
<blockquote>
<pre>svn merge svn+ssh://mrhalzy@foobar.com/code/branch/awesome <strong>--accept launch</strong></pre>
</blockquote>
<p>It is important to know that we are using the default merge tool (probably diff3) for the bulk of the merging and only using araxismerge when diff3 can't handle it. Because araxis does a bit more than diff3, you might not have any conflicts to resolve when it pops up. This means that diff3 couldn't handle it, but araxis could. Just save, close and continue.</p>
<p>Cheers,<br />
Halzy</p>
<p>"Wait!", screams the pseudo-technical guy in the back of the room. "What is it that the script is doing?"</p>
<p>Well, it's remapping the argument order. Subversion isn't consistent in it's argument order for diff3-cmd and merge-tool-cmd. So we have to use this proxy script to make it work. The arguments are: $1 = base, $2 = theirs, $3 = mine, $4=merge result location.</p>
]]></content:encoded>
			<wfw:commentRss>http://benjaminhalsted.com/2010/03/subversion-lovesaraxis-merge-subversion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
