<?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; Version Control</title>
	<atom:link href="http://shifteleven.com/articles/category/version-control/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>Managing Vim Scripts with a Vimball</title>
		<link>http://shifteleven.com/articles/2009/05/21/managing-vim-plugins-with-a-vimball</link>
		<comments>http://shifteleven.com/articles/2009/05/21/managing-vim-plugins-with-a-vimball#comments</comments>
		<pubDate>Fri, 22 May 2009 03:38:27 +0000</pubDate>
		<dc:creator>K. Adam Christensen</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Version Control]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[vim]]></category>
		<category><![CDATA[vimball]]></category>

		<guid isPermaLink="false">http://shifteleven.com/?p=214</guid>
		<description><![CDATA[I am a vim user.  The thing I like about vim is it&#8217;s speed, how universal it is, and it&#8217;s customizations.  These customizations can come in the form of plugins, syntax files, compilers, and code completion utilities; all of which are scripts.  Scripts can be a single file like MiniBufExplorer or can encompass multple files [...]]]></description>
			<content:encoded><![CDATA[<p>I am a <a href="http://www.vim.org">vim</a> user.  The thing I like about vim is it&#8217;s speed, how universal it is, and it&#8217;s customizations.  These customizations can come in the form of plugins, syntax files, compilers, and code completion utilities; all of which are <a href="http://www.vim.org/scripts/index.php">scripts</a>.  Scripts can be a single file like <a href="http://vim.sourceforge.net/scripts/script.php?script_id=159">MiniBufExplorer</a> or can encompass multple files like <a href="http://www.vim.org/scripts/script.php?script_id=1213">vjde</a>.</p>
<p>Single file scripts are fairly easy to manage.  If you notice a new version of your script is released, then simply replace your file with the new version.  Likewise, it&#8217;s very easy to remove the script if you want to just try it out.  However, scripts spanning multiple files are much harder to manage.  For one, the script&#8217;s files get merged in with all of your other script files.</p>
<p>To help know what files are apart of what plugin, I manage <a href="http://github.com/pope/personal/tree/master">my vim scripts in git</a>.  Another way to keep track of things is to use a <a href="http://vimdoc.sourceforge.net/htmldoc/pi_vimball.html">vimball</a>.</p>
<h3>What Are Vimballs?</h3>
<p>Vimballs are essential vim script installers.  Each vimball contains all of the files that are needed for the script to work.  Not only that, but it also has a hook for you to easily uninstall the script as well.</p>
<p><a href="http://www.vim.org/scripts/script.php?script_id=1714">Tail Bundle</a> is a script that mimics <code>tail -f</code> for vim.  The downloadable artifact is a vba file.  That file is the vimball.  To actually install the file:</p>
<ol>
<li><code>vim tail-03.vba</code></li>
<li><code>:so %</code></li>
<li><code>:q</code></li>
</ol>
<p>So what that all means is that you&#8217;re opening the vimball in vim.  From there, you&#8217;re executing the instructions that are in the file.  Lastly, you&#8217;re just quitting.  You see, a vimball is a vim script in of itself.  So executing it writes everything out to where it&#8217;s supposed to go.</p>
<p>While the tail bundle makes use of the vimball, not every script does.  Luckily, it&#8217;s easy to make vimballs out of most script downloads.<br />
<span id="more-214"></span></p>
<h3>Converting Scripts to a Vimball</h3>
<p>In order to make a vimball, it&#8217;s quite easy. List out all of the files you want to include in your bundle, relative to where your current directory is.  For instance:</p>
<pre>doc/myawesomeplugin.txt
plugin/myawesomeplugin.vim
syntax/myawesomeplugin.vim</pre>
<p>Next thing, while in visual mode, type <code>ggVG:MkVimball myawesomeplugin</code>.  The <code>ggVG</code> is a akin to doing a &#8220;select all&#8221;.</p>
<p>This will create your install file named myawesomeplugin.vba.  Now just install it like any other vimball.</p>
<p>You don&#8217;t have to just make vimballs for your own scripts.  I love <a href="http://www.vim.org/scripts/script.php?script_id=2611">xpt</a>, but there are so many files to manage.  Well, you can make the vimball script even when the author does not.</p>
<p>Open a new buffer and use the command <code>:r! find . -type f</code>.  This will find all of the files and print them out into the buffer.  If you want to do any cleanup, like remove blank lines and removing the extra <code>./</code> before each entry, feel free to do so.  Now that you easily got a list of all the files, create the vimball from that.</p>
<p>Now you have records of what went in with the script and you have a super easy way of uninstalling the script too.  Speaking of which&#8230;</p>
<h3>Removing Scripts</h3>
<p>To remove a vimball script, simply execute <code>:RmVimball myawesomeplugin</code>.  That will go through and delete all files created by the plugin.</p>
<p>After figuring this out, I now know that when I want to use and install vim scripts, I&#8217;m going to do so via vimballs.  It&#8217;s too easy not to, and the benefit of having a way to back-out scripts is just too tempting.</p>
]]></content:encoded>
			<wfw:commentRss>http://shifteleven.com/articles/2009/05/21/managing-vim-plugins-with-a-vimball/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Code Reviews &#8211; Inherit in Git</title>
		<link>http://shifteleven.com/articles/2008/05/17/code-reviews-inherit-in-git</link>
		<comments>http://shifteleven.com/articles/2008/05/17/code-reviews-inherit-in-git#comments</comments>
		<pubDate>Sat, 17 May 2008 23:48:30 +0000</pubDate>
		<dc:creator>K. Adam Christensen</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Version Control]]></category>
		<category><![CDATA[codereview]]></category>
		<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://shifteleven.com/?p=77</guid>
		<description><![CDATA[Code Reviews are common in software development.  One programmer reviews another&#8217;s code to find potential issues or to see if the developer could have used something that the system already provided.
With multiple programmers, you can probably expect a versioning system, perhaps a centralized versioning system like SVN or Perforce.  With that system, each [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/Code_review">Code Reviews</a> are common in software development.  One programmer reviews another&#8217;s code to find potential issues or to see if the developer could have used something that the system already provided.</p>
<p>With multiple programmers, you can probably expect a versioning system, perhaps a centralized versioning system like SVN or Perforce.  With that system, each programmer would make his/her changes and then would check in his/her changes into the repository.  From there, the programmer&#8217;s peers would review the code.</p>
<p>What&#8217;s the problem with this system?  The code is already checked in.  The pressure is on the peers to ensure that the code is good, and it&#8217;s likely that this could slip through the cracks.  I mean, those peers are working on getting 10 features complete themselves.</p>
<h3>Enter Git</h3>
<p>Well, I would argue that Git has a strong code review process built right in.  This is due to the process of how distributed version control works.</p>
<p><span id="more-77"></span></p>
<p>Programmer <strong>A</strong> creates a <a href="http://railsontherun.com/2008/3/3/how-to-use-github-and-submit-a-patch">fork</a> of the master project. <strong>A</strong> makes his changes and commit his code; however, the code is committed to his local repository and not the master origin.  This is because <strong>A</strong> does not have write access to that repository.</p>
<p><strong>A</strong> has to contact programmer <strong>B</strong>, who has write access. <strong>A</strong> tells <strong>B</strong> that he should pull his code.  Since <strong>B</strong> has to pull the code, this means that <strong>B</strong> has to review the code coming in.</p>
<p>It&#8217;s this workflow that promotes code review.  Now that&#8217;s not to say that you can&#8217;t do code reviews in a centralized model, it just fits a little better in a distributed model</p>
]]></content:encoded>
			<wfw:commentRss>http://shifteleven.com/articles/2008/05/17/code-reviews-inherit-in-git/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Issue Tracking + Git = ticgit</title>
		<link>http://shifteleven.com/articles/2008/05/10/issue-tracking-git-ticgit</link>
		<comments>http://shifteleven.com/articles/2008/05/10/issue-tracking-git-ticgit#comments</comments>
		<pubDate>Sun, 11 May 2008 00:08:53 +0000</pubDate>
		<dc:creator>K. Adam Christensen</dc:creator>
				<category><![CDATA[Version Control]]></category>
		<category><![CDATA[fork]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[issuetracker]]></category>
		<category><![CDATA[sinatra]]></category>
		<category><![CDATA[ticgit]]></category>
		<category><![CDATA[ticgit-watchtower]]></category>

		<guid isPermaLink="false">http://shifteleven.com/?p=73</guid>
		<description><![CDATA[So not only is git useful for the small projects it&#8217;s also good for keeping track of todos and issues.  Ticgit is a distributed ticketing systems based on git.   It provides a command line interface as well as a web interface via sinatra and stores all of the ticket info in a [...]]]></description>
			<content:encoded><![CDATA[<p>So not only is <a href="http://shifteleven.com/articles/2008/04/30/version-control-isnt-for-just-the-big-projects,">git useful for the small projects</a> it&#8217;s also good for keeping track of todos and issues.  <a href="http://github.com/schacon/ticgit">Ticgit</a> is a distributed ticketing systems based on git.   It provides a command line interface as well as a web interface via <a href="http://sinatrarb.com">sinatra</a> and stores all of the ticket info in a separate branch, called <code>ticgit</code>.  Rather clever I think.</p>
<p><span id="more-73"></span></p>
<p>Ticgit takes a simplistic approach to issue tracking as <a href="http://www.lighthouseapp.com">Lighthouse</a> has done.  You can comment, add tags, manage the state of an issue, save views, and change to whom an issue is assigned.  There is still more planned, like keeping track of milestones and syncing the tickets to Lighthouse.</p>
<p>As mentioned, there is a web interface to ticgit; however, it wasn&#8217;t my cup of tea.  So I have started my own web interface, <a href="http://github.com/pope/ticgit-watchtower.">tiwatchtower</a> It&#8217;s still a little rough around the edges, but I would love to hear any thoughts.</p>
<h3>Conclusion</h3>
<p>So far, I like it and it&#8217;s exciting to see how git can be pushed.  It&#8217;s great for keeping track of things that are on my mind without worrying about having to setup <a href="http://trac.edgewall.org/">trac</a> or having to use up a Lighthouse project.  It&#8217;s simple, effective, and worth a look at.</p>
]]></content:encoded>
			<wfw:commentRss>http://shifteleven.com/articles/2008/05/10/issue-tracking-git-ticgit/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Version Control Isn&#8217;t for Just the Big Projects</title>
		<link>http://shifteleven.com/articles/2008/04/30/version-control-isnt-for-just-the-big-projects</link>
		<comments>http://shifteleven.com/articles/2008/04/30/version-control-isnt-for-just-the-big-projects#comments</comments>
		<pubDate>Wed, 30 Apr 2008 13:37:01 +0000</pubDate>
		<dc:creator>K. Adam Christensen</dc:creator>
				<category><![CDATA[Version Control]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[mercurial]]></category>

		<guid isPermaLink="false">http://shifteleven.com/?p=69</guid>
		<description><![CDATA[We know that when you are working with a bunch of developers for code that&#8217;s going to be deployed to the world that version control is something that you want in your toolbox.  I would like to submit that it&#8217;s not the only reason to use source control.
I bought a Flex book to, well, [...]]]></description>
			<content:encoded><![CDATA[<p>We know that when you are working with a bunch of developers for code that&#8217;s going to be deployed to the world that version control is something that you want in your toolbox.  I would like to submit that it&#8217;s not the only reason to use source control.</p>
<p>I bought a <a href="http://www.amazon.com/Adobe-Flex-3-Training-Source/dp/0321529189">Flex book</a> to, well, teach myself Flex.  The book right now is taking me though one application and is building it out piece by piece.  So I began to think: &#8220;What if I just keep track of all my changes through git?&#8221;</p>
<p>For one, Flex is nice because it&#8217;s all XML, so that makes revision tracking fairly easy.  Also, git is very easy to get started because you don&#8217;t have to do any server setup.  Just issue a <code>git init</code> command and get going.  Then after each chapter, I can tag the repository for posterity&#8217;s sake.  And I have to say, it&#8217;s been great to see how the code has changes, especially since <a href="http://www.adobe.com/products/flex/">Flex Builder</a> generates code.</p>
<p>That&#8217;s one thing I love about git, and mercurial, it&#8217;s so easy to start using version control for even the littlest of tasks.</p>
]]></content:encoded>
			<wfw:commentRss>http://shifteleven.com/articles/2008/04/30/version-control-isnt-for-just-the-big-projects/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<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>
