<?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>Solutions Log &#187; Subversion</title>
	<atom:link href="http://solutions.unixsherpa.com/category/scm/svn/feed/" rel="self" type="application/rss+xml" />
	<link>http://solutions.unixsherpa.com</link>
	<description>by Dan Reiland</description>
	<lastBuildDate>Fri, 16 Apr 2010 20:28:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Git Subtree Merge and git-svn</title>
		<link>http://solutions.unixsherpa.com/2010/03/02/git-subtree-merge-and-git-svn/</link>
		<comments>http://solutions.unixsherpa.com/2010/03/02/git-subtree-merge-and-git-svn/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 17:02:37 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[Git]]></category>
		<category><![CDATA[SCM]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[git-svn]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[recipe]]></category>

		<guid isPermaLink="false">http://solutions.unixsherpa.com/?p=262</guid>
		<description><![CDATA[Issue: Git submodules do not play nicely with git-svn; git subtree merging is a more appropriate strategy for my specific use case. Resolution: This is my recipe (borrowed heavily from the formal git documentation). git checkout -b TRY-MERGE master git remote add -f Bproject /path/to/B git merge -s ours --no-commit Bproject/master git read-tree --prefix=dir-B/ -u [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Issue:</strong> Git submodules do not play nicely with git-svn; git subtree merging is a more appropriate strategy for my specific use case.</p>
<p><strong>Resolution:</strong> This is my recipe (borrowed heavily from the formal git documentation).</p>
<div class="codecolorer-container bash twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">git</span> checkout <span style="color: #660033;">-b</span> TRY-MERGE master<br />
<span style="color: #c20cb9; font-weight: bold;">git</span> remote add <span style="color: #660033;">-f</span> Bproject <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>B<br />
<span style="color: #c20cb9; font-weight: bold;">git</span> merge <span style="color: #660033;">-s</span> ours <span style="color: #660033;">--no-commit</span> Bproject<span style="color: #000000; font-weight: bold;">/</span>master<br />
<span style="color: #c20cb9; font-weight: bold;">git</span> read-tree <span style="color: #660033;">--prefix</span>=dir-B<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #660033;">-u</span> Bproject<span style="color: #000000; font-weight: bold;">/</span>master<br />
<span style="color: #c20cb9; font-weight: bold;">git</span> commit <span style="color: #660033;">-m</span> <span style="color: #ff0000;">&quot;Task - JIRA-001 - Merge B project as our subdirectory&quot;</span><br />
<span style="color: #c20cb9; font-weight: bold;">git</span> checkout master<br />
<span style="color: #c20cb9; font-weight: bold;">git</span> merge TRY-MERGE master <span style="color: #660033;">-m</span> <span style="color: #ff0000;">&quot;Task - JIRA-001 - Merging subtrees into project.&quot;</span><br />
<span style="color: #c20cb9; font-weight: bold;">git-svn</span> dcommit</div></div>
<p>You may update your local copy from the remote at any time with:</p>
<div class="codecolorer-container bash twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">git</span> pull <span style="color: #660033;">-s</span> subtree Bproject master</div></div>
<p>Reference: <a href="http://kernel.org/pub/software/scm/git/docs/v1.7.0/howto/using-merge-subtree.html">http://kernel.org/pub/software/scm/git/docs/v1.7.0/howto/using-merge-subtree.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://solutions.unixsherpa.com/2010/03/02/git-subtree-merge-and-git-svn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Commit a linear git history to subversion</title>
		<link>http://solutions.unixsherpa.com/2010/02/26/commit-a-linear-git-history-to-subversion/</link>
		<comments>http://solutions.unixsherpa.com/2010/02/26/commit-a-linear-git-history-to-subversion/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 20:46:44 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[Git]]></category>
		<category><![CDATA[SCM]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[howto]]></category>

		<guid isPermaLink="false">http://solutions.unixsherpa.com/?p=250</guid>
		<description><![CDATA[Issue: I was recently asked to integrate my local development (which I had done under git management) into our central Subversion server. How to do this while preserving my commit history? Resolution: After a lot of reading (and an upgrade to git-1.7.0) I found the following recipe to work for me. git branch master.bak master [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Issue:</strong> I was recently asked to integrate my local development (which I had done under git management) into our central Subversion server. How to do this while preserving my commit history?</p>
<p><strong>Resolution:</strong> After a lot of reading (and an upgrade to git-1.7.0) I found the following recipe to work for me.</p>
<div class="codecolorer-container bash twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">git</span> branch master.bak master<br />
<span style="color: #c20cb9; font-weight: bold;">git-svn</span> init <span style="color: #c20cb9; font-weight: bold;">svn</span>:<span style="color: #000000; font-weight: bold;">//</span>repo.domain.local<span style="color: #000000; font-weight: bold;">/</span>Project<span style="color: #000000; font-weight: bold;">/</span>trunk<span style="color: #000000; font-weight: bold;">/</span>sub<span style="color: #000000; font-weight: bold;">/</span>directory<br />
<span style="color: #c20cb9; font-weight: bold;">git-svn</span> fetch<br />
<span style="color: #c20cb9; font-weight: bold;">git</span> checkout <span style="color: #660033;">-b</span> svnrebase <span style="color: #c20cb9; font-weight: bold;">git-svn</span><br />
<span style="color: #c20cb9; font-weight: bold;">git-svn</span> rebase<br />
<span style="color: #c20cb9; font-weight: bold;">git</span> rebase <span style="color: #660033;">--root</span> <span style="color: #660033;">--onto</span> svnrebase master<br />
<span style="color: #c20cb9; font-weight: bold;">git-svn</span> dcommit</div></div>
]]></content:encoded>
			<wfw:commentRss>http://solutions.unixsherpa.com/2010/02/26/commit-a-linear-git-history-to-subversion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Recursively delete .svn directories</title>
		<link>http://solutions.unixsherpa.com/2009/04/10/recursively-delete-svn-directories/</link>
		<comments>http://solutions.unixsherpa.com/2009/04/10/recursively-delete-svn-directories/#comments</comments>
		<pubDate>Fri, 10 Apr 2009 20:17:02 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[SCM]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[vcs]]></category>

		<guid isPermaLink="false">http://solutions.unixsherpa.com/?p=56</guid>
		<description><![CDATA[Abstract This is a simple example of a unix command, which recursively deletes subversion .svn folders. Subversion is a well-spread open-source revision control application. Every copy of source code received from subversion repository has .svn folders, which store metadata. However, if you want to use or distribute source code for end-user consumption, these folders are [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Abstract</strong></p>
<p>This is a simple example of a unix command, which recursively deletes subversion .svn folders. Subversion is a well-spread open-source revision control application. Every copy of source code received from subversion repository has .svn folders, which store metadata. However, if you want to use or distribute source code for end-user consumption, these folders are not necessary. A simple svn export [repository] is suitable.</p>
<p><strong>Compatible </strong><span> </span></p>
<ul>
<li>Linux, FreeBSD, Mac OS X, Cygwin...</li>
<li>Nearly any unix-compatible system with rm and find</li>
</ul>
<p>We use find command to find all .svn folders beginning from current directory.</p>
<pre>
$ find . -type d -name .svn
</pre>
<pre>
./.svn
./sourceA/.svn
./sourceB/.svn
./sourceB/module/.svn
./sourceC/.svn
</pre>
<p>It is possible to pass these directories directly to rm command, using grave accent quotes (key to left of '1')</p>
<pre>
$ rm -rf `find . -type d -name .svn`
</pre>
<p>So, this will remove every .svn folder beginning from current directory.</p>
<p><strong>Source code: bash script</strong></p>
<pre>
#!/bin/sh

echo "recursively removing .svn folders from"
pwd
rm -rf `find . -type d -name .svn`
</pre>
<p>You may save this script to /usr/bin/csvn (or other binary folder included in path) and use later to get 'clean' project source without typing lengthy commands.</p>
<p>For example,</p>
<pre>
$ svn checkout svn://server.com/svn/project
A    project/index.php
A    project/sourceA/a.php
A    project/sourceA/a1.php
A    project/sourceA/a2.php
A    project/sourceB/b.php
A    project/sourceB/module/lib.php
A    project/sourceC/c.php
Checked out revision 15.

$ cd project
$ csvn
</pre>
<p><strong>Warning</strong><br />
<em>Always check you current working directory before calling 'csvn'.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://solutions.unixsherpa.com/2009/04/10/recursively-delete-svn-directories/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
