<?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>Delivering Quality &#187; SVN</title>
	<atom:link href="http://www.markdeepwell.com/tag/svn/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.markdeepwell.com</link>
	<description>A Software Developers View of the World</description>
	<lastBuildDate>Sat, 31 Dec 2011 22:41:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Upgrade to Git</title>
		<link>http://www.markdeepwell.com/2011/12/upgrade-to-git/</link>
		<comments>http://www.markdeepwell.com/2011/12/upgrade-to-git/#comments</comments>
		<pubDate>Fri, 30 Dec 2011 22:25:36 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[SVN]]></category>
		<category><![CDATA[version control]]></category>

		<guid isPermaLink="false">http://www.markdeepwell.com/?p=655</guid>
		<description><![CDATA[Remember when Subversion was the new tool that all the cool kids were flocking to? Well, Subversion is now the old and busted, and it&#8217;s time to move to Git. It&#8217;s time to upgrade your Subversion repo (if your still using it) to Git because of the benefits you will gain from moving to a [...]]]></description>
			<content:encoded><![CDATA[<p>Remember when Subversion was the new tool that all the cool kids were flocking to? Well, Subversion is now the old and busted, and it&#8217;s time to move to Git.</p>
<p>It&#8217;s time to upgrade your Subversion repo (if your still using it) to Git because of the benefits you will gain from moving to a more flexible tool.</p>
<ol>
<li>Distributed: When you checkout (or clone in the git world) a repository, you are checking out all the files in the repository, which means you can work independently of others. You can commit and make changes on master, or another branch without imposing your incomplete changes on the rest of the team.</li>
<li>Simple Merging: Compared to Subversion, merging is fun. Because its so easy, as a developer you are more inclined to make additional branches and use them as they should be used. This adds a lot of flexibility in where and when the changes are pushed to master.</li>
<li>Speed: A subversion commit doesn&#8217;t end until all the files have been transferred to the remote server, with git, commits are completed instantly because you are committing to the local repository, not the remote one. Therefore, you don&#8217;t have to wait for actions to complete as they are almost instantaneous.</li>
</ol>
<p>I could go on, but those are the big ones for me. Note: I&#8217;m not against other DVCS systems like Mercurial, Bazaar, but I chose Git because of it&#8217;s popularity and ability to handle the Linux kernel.</p>
<p><a href="http://git-scm.com/download">Download GIT now</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.markdeepwell.com/2011/12/upgrade-to-git/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby Subversion Bindings</title>
		<link>http://www.markdeepwell.com/2010/06/ruby-subversion-bindings/</link>
		<comments>http://www.markdeepwell.com/2010/06/ruby-subversion-bindings/#comments</comments>
		<pubDate>Sun, 27 Jun 2010 05:30:01 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Basics]]></category>
		<category><![CDATA[Software Bindings]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby Subversion Bindings]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[SVN]]></category>

		<guid isPermaLink="false">http://www.markdeepwell.com/?p=516</guid>
		<description><![CDATA[Subversion has bindings for a variety of languages: Java, Perl, Python and Ruby. Of these I am most interested in the Ruby bindings as I&#8217;m building a Rails application. Unfortunately the documentation is completely lacking and bits of it are scattered throughout the web. This is an attempt to provide the code and how-to for [...]]]></description>
			<content:encoded><![CDATA[<p>Subversion has bindings for a variety of languages: Java, Perl, Python and Ruby. Of these I am most interested in the Ruby bindings as I&#8217;m building a Rails application. Unfortunately the documentation is completely lacking and bits of it are scattered throughout the web. This is an attempt to provide the code and how-to for the most common tasks.</p>
<p>Before we get to the code, validate you have the Ruby Subversion bindings installed correctly by running irb from a terminal:</p>
<p>irb(main):001:0&gt; require &#8216;svn/client&#8217;<br />
=&gt; true</p>
<p>Onto the source code. Start it off by including the required svn modules:</p>
<pre class="brush: ruby; title: ; notranslate">
require &quot;svn/core&quot;
require &quot;svn/client&quot;
require &quot;svn/wc&quot;
require &quot;svn/repos&quot;
</pre>
<p>Then setup the context with your subversion credentials:</p>
<pre class="brush: ruby; title: ; notranslate">
ctx = Svn::Client::Context.new()
ctx.add_simple_provider
ctx.auth_baton[Svn::Core::AUTH_PARAM_DEFAULT_USERNAME] = 'username'
ctx.auth_baton[Svn::Core::AUTH_PARAM_DEFAULT_PASSWORD] = 'password'
</pre>
<p>Now you can run any of the following commands on a remote subversion repository.</p>
<h3>SVN Info</h3>
<pre class="brush: ruby; title: ; notranslate">
repos_uri = 'http://svn.website.com/project/trunk'
revision = 50
begin
  ctx.info(repos_uri, revision) do |path, info|
    puts(&quot;Url: #{info.url}&quot;)
    puts(&quot;Last changed rev: #{info.last_changed_rev}&quot;)
    puts(&quot;Last changed author: #{info.last_changed_author}&quot;)
    puts(&quot;Last changed date: #{info.last_changed_date}&quot;)
    puts(&quot;Kind: #{info.kind}&quot;)
  end
rescue Svn::Error =&gt; e
  # catch a generic svn error
  raise &quot;Failed to retrieve SVN info at revision &quot; + revision.to_s
end
</pre>
<h3>SVN Checkout</h3>
<pre class="brush: ruby; title: ; notranslate">
repos_uri = 'http://svn.website.com/project/trunk'
output_dir '/home/billy/project_name'
revision = 50
begin
  ctx.checkout(repos_uri, output_dir, revision.to_i, nil)
rescue Svn::Error::CLIENT_UNRELATED_RESOURCES =&gt; e # revision doesn't exist
  raise &quot;No such revision &quot; + revision.to_s + &quot; at &quot; + repos_uri
end
</pre>
<h3>SVN Log</h3>
<pre class="brush: ruby; title: ; notranslate">
repos_uri = 'http://svn.website.com/project/trunk'
ctx.log(repos_uri, 0, 'HEAD', 0, true, nil) do |changed_paths, rev, author, date, message|
  puts(&quot;Revision: #{rev}&quot;)
  puts(&quot;Author: #{author}&quot;)
  puts(&quot;Date: #{date}&quot;)
  puts(&quot;Message: #{message}&quot;)
  puts(&quot;---------------------------&quot;)
end
</pre>
<h3>SVN List</h3>
<pre class="brush: ruby; title: ; notranslate">
repos_uri = 'http://svn.website.com/project/trunk'
ctx.list(repos_uri, &quot;HEAD&quot;) do |path, dirent, lock, abs_path|
  if !path.blank?
    puts(&quot;Path: #{path}&quot;)
  end
end
</pre>
<p>That should get you started with the ruby bindings. If you want to know how to do anything else let me know in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.markdeepwell.com/2010/06/ruby-subversion-bindings/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

