<?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>Blog - ShiftEleven &#187; svn</title>
	<atom:link href="http://shifteleven.com/articles/tag/svn/feed" rel="self" type="application/rss+xml" />
	<link>http://shifteleven.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Sat, 19 Sep 2009 11:19:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0-alpha</generator>
		<item>
		<title>Using Subversion to Maintain your Configuration Files</title>
		<link>http://shifteleven.com/articles/2007/01/01/using-subversion-to-maintain-your-configuration-files</link>
		<comments>http://shifteleven.com/articles/2007/01/01/using-subversion-to-maintain-your-configuration-files#comments</comments>
		<pubDate>Mon, 01 Jan 2007 23:03:31 +0000</pubDate>
		<dc:creator>K. Adam Christensen</dc:creator>
				<category><![CDATA[Version Control]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[etc]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://dev.fecalrod.com/?p=22</guid>
		<description><![CDATA[I got this tip from Jerry Jackson who told me about storing all of my configuration files, like .bash_profile or .vimrc, in an etc directory inside of my home directory.  Once the files are in that directory, you could create a subversion repository; and inside of this repository, put the etc directory in that. [...]]]></description>
			<content:encoded><![CDATA[<p>I got this tip from <a href="http://www.jcj.net">Jerry Jackson</a> who told me about storing all of my configuration files, like <code>.bash_profile</code> or <code>.vimrc</code>, in an <code>etc</code> directory inside of my home directory.  Once the files are in that directory, you could create a subversion repository; and inside of this repository, put the <code>etc</code> directory in that.  Once the files are in a repository, you can check out that repository on any machine.  Now you have a way to keep all of your config files easily in sync.</p>
<p><span id="more-22"></span></p>
<h3>Setting Up <code>~/etc</code></h3>
<p>Since <code>/etc</code> contains any configuration file, why not have the home directory mimic this?</p>
<p>So I have moved a bunch of files into <code>~/etc</code>:</p>
<ul>
<li><code>.bash_profile</code></li>
<li><code>.bashrc</code></li>
<li><code>.irbrc</code></li>
<li><code>.subversion/</code></li>
<li><code>.vim/</code></li>
<li><code>.vimrc</code></li>
</ul>
<p>When I moved the files, I renamed them to not include the dot in front of the name, that way the files would not be hidden.</p>
<p>So that everything still works correctly, I make a bunch of symlinks for the files in my <code>etc</code> directory to the home directory, i.e. <code>ln -s ~/etc/bash<em>profile ~/.bash</em>profile</code>.  This is so that the configuration files work like they used to.</p>
<h3>The Subversion Repository</h3>
<p>By moving these files into a directory, that directory can now be put into a repository.  This is the beauty of it all.  Once in a repository, the <code>etc</code> directory can be checked out anywhere.  This means that anytime I want to change a config, like a new wim setting, I can make sure that vim behaves the same no matter what machine I&#8217;m using by committing that change and then performing an update.</p>
<p>Because I&#8217;m using subversion, I can use properties like <code>svn:ignore</code> on something that I don&#8217;t want have shared between my machines.  I committed <code>etc/subversion/</code> because I want to share the <code>config</code> file located in that directory.  As for all other files, I don&#8217;t want to share it.  So i put an ignore of <code>*</code> on that directory.</p>
<p>You can also use <code>svn:externals</code>.  I use <a href="http://tpope.net/">Tim Pope&#8217;s</a> <a href="http://rails.vim.tpope.net/">rails vim</a> file.  He keeps his work in subversion, so by using the externals, I can make sure that I have his most up-to-date work at any time.</p>
<h3>Where To Go From Here</h3>
<p>If you keep a repository of your configuration files, you could also keep script files in there, like perhaps <strong>a script which will create all of your <code>etc</code> symlinks</strong> for you :).  You could also keep a copy of your firefox bookmarks in sync.  The sky&#8217;s the limit.</p>
]]></content:encoded>
			<wfw:commentRss>http://shifteleven.com/articles/2007/01/01/using-subversion-to-maintain-your-configuration-files/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SVN Overview</title>
		<link>http://shifteleven.com/articles/2006/08/28/svn-overview</link>
		<comments>http://shifteleven.com/articles/2006/08/28/svn-overview#comments</comments>
		<pubDate>Mon, 28 Aug 2006 23:40:19 +0000</pubDate>
		<dc:creator>K. Adam Christensen</dc:creator>
				<category><![CDATA[Version Control]]></category>
		<category><![CDATA[cvs]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://dev.fecalrod.com/articles/2006/08/26/svn-overview</guid>
		<description><![CDATA[First and foremost, this blog is for me.  It&#8217;s kind of a collection of things that I&#8217;m learning and want to learn.  So for me, I&#8217;m going to start with the basics of SVN(Subversion)
I first used CVS(Client Version System) and it does it&#8217;s job.  There are somethings I wish that were easier. [...]]]></description>
			<content:encoded><![CDATA[<p>First and foremost, this blog is for me.  It&#8217;s kind of a collection of things that I&#8217;m learning and want to learn.  So for me, I&#8217;m going to start with the basics of <a href="http://subversion.tigris.org/">SVN(Subversion)</a></p>
<p>I first used <a href="http://www.nongnu.org/cvs/">CVS(Client Version System)</a> and it does it&#8217;s job.  There are somethings I wish that were easier.  That&#8217;s where SVN comes in.  A lot of the commands are the same.  <code>svn add</code> or <code>svn commit</code> is not that much different from that of <code>cvs add</code> or <code>cvs commit</code>, unless you get to some of the other features.</p>
<p><span id="more-3"></span></p>
<p><code>svn add</code> allows you to put a <code>--force</code> parameter along with your add.  This will recursively add all the files for a given directory.  Even if files have already been added in a given directory, those will be skipped and only the new ones will be added.</p>
<p>The other thing that I love is <code>svn move file_old file_new</code>.  Finally, it&#8217;s easy to move files.  No need to delete a file from the repository and add it back to the repository with a new name like in CVS.  Now don&#8217;t get me wrong, if you watch the output of this SVN command, you will see that it will do something like this:</p>
<pre>D old_fileA new_file</pre>
<p>So what&#8217;s the difference?  Isn&#8217;t this just a shortcut then really?  Well, no.  SVN keeps track that the newly added file is actually apart of the deleted file.  And it&#8217;s not just files, directories also can be moved and copied.</p>
<p>Finally, there is <code>svn resolved</code>.  So let&#8217;s say that two people have checked out some code.  Person A makes some changes and submits it.  Person B also has it checked out and makes some changes to the same files.  SVN will attempt to merge the files if it can do it safely, which by the way has been pretty good; no complaints yet.  But sometimes there are conflicts which arise when the code cannot safely be merged.  So Person A commits his/her changes back to the repository.  Now Person B commits his/her changes.  Upon doing so, he/she should see a message something like:</p>
<pre>C same_file</pre>
<p>It is up to Person B to resolve this conflict because his/her code will not be able to go into the repository until that happens.  SVN will create a few extra files; <em>same_file.mine</em>, <em>same_file.rXX</em>, <em>same_file.rXY</em>, for when you want to see what you did, what the code was like before you edited it, and what the code is like now that someone made changes to it.  So Person B merges the code so that all is well in the world.  All he/she has to do now is run <code>svn resolved same_file</code> and the conflict will be removed so that the file can now be put in the repository.  The other nice thing that this does is remove those extra files that SVN created when it found the conflict.</p>
<p>While this is an overview, nothing beats the comprehensive <a href="http://svnbook.red-bean.com/en/1.1/ch09.html">list of commands</a></p>
]]></content:encoded>
			<wfw:commentRss>http://shifteleven.com/articles/2006/08/28/svn-overview/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
