<?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>Brain Matters &#187; svn</title>
	<atom:link href="http://blog.agoragames.com/tag/svn/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.agoragames.com</link>
	<description></description>
	<lastBuildDate>Mon, 16 Aug 2010 19:36:30 +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>Automagically Managing Merges with SVN</title>
		<link>http://blog.agoragames.com/2009/02/23/automagically-managing-merges-with-svn/</link>
		<comments>http://blog.agoragames.com/2009/02/23/automagically-managing-merges-with-svn/#comments</comments>
		<pubDate>Mon, 23 Feb 2009 16:05:33 +0000</pubDate>
		<dc:creator>Ola Mork</dc:creator>
				<category><![CDATA[Engineering]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://blog.agoragames.com/?p=135</guid>
		<description><![CDATA[For each Guitar Hero game we have a full trunk/branches/tags structure. Most of the trunks are copied off of their predecessor&#8217;s trunk. This works pretty well for us, but it can be hairy to merge changes made to the original (game-1) trunk down to each of its descendants. I found that I was often forgetting [...]]]></description>
			<content:encoded><![CDATA[<p>For each Guitar Hero game we have a full trunk/branches/tags structure. Most of the trunks are copied off of their predecessor&#8217;s trunk. This works pretty well for us, but it can be hairy to merge changes made to the original (<code>game-1</code>) trunk down to each of its descendants.<span id="more-135"></span> I found that I was often forgetting to merge to *all* of the relevant branches. To mitigate the effects of my amnesia I wrote this, <code>chmod +x</code>&#8216;d it and dropped it into my <code>~/bin</code> (which happens to be in my <code>PATH</code>):</p>
<pre class="brush: ruby">
#! /usr/bin/env ruby
repository_host = &#039;your.svn.repository.host&#039;
working_dirs = [&#039;~/Documents/game-2/trunk&#039;,
  &#039;~/Documents/game-3/trunk&#039;,
  &#039;~/Documents/game-4/trunk&#039;]

p &quot;usage: $ gh-merge revision [revision revision revision ...]&quot; if ARGV.empty? 

ARGV.each do |revision|
  working_dirs.each do |working_dir|
    p &quot;merging #{working_dir}, revision #{revision}&quot;
    `svn merge -c #{revision} \
     svn+ssh://#{repository_host}/agora/game-1/trunk \
     #{working_dir}`
  end
end

working_dirs.each do |working_dir|
  p &quot;committing #{working_dir}&quot;
  `svn ci -m &quot;svn merge -c #{ARGV.join(&#039;, &#039;)} \
   svn+ssh://#{repository_host}/agora/game-1/trunk&quot; \
   #{working_dir}`
end
</pre>
<p>The <code>working_dirs</code> represent the paths to my working dirs for each branch I want to merge my trunk changes to.</p>
<p>To use I just pass the revisions I want to push to each branch like so:</p>
<pre class="brush: bash">
ola$ gh-merge 31774 31775 31780
</pre>
<p>and it merges and commits those revisions to each branch. It assumes you&#8217;re caching your authentication for svn.</p>




	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fblog.agoragames.com%2F2009%2F02%2F23%2Fautomagically-managing-merges-with-svn%2F&amp;title=Automagically%20Managing%20Merges%20with%20SVN" title="Reddit"><img src="http://blog.agoragames.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.agoragames.com%2F2009%2F02%2F23%2Fautomagically-managing-merges-with-svn%2F&amp;title=Automagically%20Managing%20Merges%20with%20SVN&amp;bodytext=For%20each%20Guitar%20Hero%20game%20we%20have%20a%20full%20trunk%2Fbranches%2Ftags%20structure.%20Most%20of%20the%20trunks%20are%20copied%20off%20of%20their%20predecessor%27s%20trunk.%20This%20works%20pretty%20well%20for%20us%2C%20but%20it%20can%20be%20hairy%20to%20merge%20changes%20made%20to%20the%20original%20%28game-1%29%20trunk%20down%20to%20ea" title="Digg"><img src="http://blog.agoragames.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fblog.agoragames.com%2F2009%2F02%2F23%2Fautomagically-managing-merges-with-svn%2F&amp;title=Automagically%20Managing%20Merges%20with%20SVN&amp;notes=For%20each%20Guitar%20Hero%20game%20we%20have%20a%20full%20trunk%2Fbranches%2Ftags%20structure.%20Most%20of%20the%20trunks%20are%20copied%20off%20of%20their%20predecessor%27s%20trunk.%20This%20works%20pretty%20well%20for%20us%2C%20but%20it%20can%20be%20hairy%20to%20merge%20changes%20made%20to%20the%20original%20%28game-1%29%20trunk%20down%20to%20ea" title="del.icio.us"><img src="http://blog.agoragames.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fblog.agoragames.com%2F2009%2F02%2F23%2Fautomagically-managing-merges-with-svn%2F&amp;t=Automagically%20Managing%20Merges%20with%20SVN" title="Facebook"><img src="http://blog.agoragames.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Fblog.agoragames.com%2F2009%2F02%2F23%2Fautomagically-managing-merges-with-svn%2F&amp;t=Automagically%20Managing%20Merges%20with%20SVN&amp;s=For%20each%20Guitar%20Hero%20game%20we%20have%20a%20full%20trunk%2Fbranches%2Ftags%20structure.%20Most%20of%20the%20trunks%20are%20copied%20off%20of%20their%20predecessor%27s%20trunk.%20This%20works%20pretty%20well%20for%20us%2C%20but%20it%20can%20be%20hairy%20to%20merge%20changes%20made%20to%20the%20original%20%28game-1%29%20trunk%20down%20to%20ea" title="Tumblr"><img src="http://blog.agoragames.com/wp-content/plugins/sociable/images/tumblr.png" title="Tumblr" alt="Tumblr" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Automagically%20Managing%20Merges%20with%20SVN%20-%20http%3A%2F%2Fblog.agoragames.com%2F2009%2F02%2F23%2Fautomagically-managing-merges-with-svn%2F" title="Twitter"><img src="http://blog.agoragames.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://blog.agoragames.com/2009/02/23/automagically-managing-merges-with-svn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->