<?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>Hoketronics - Mike Hochanadel &#187; Revision Control</title>
	<atom:link href="http://hoketronics.net/category/development/revision-control-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://hoketronics.net</link>
	<description>Spiraled out of the Mind of Mike</description>
	<lastBuildDate>Sat, 17 Apr 2010 22:47:59 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<script type="text/javascript">

Meebo=function(){(Meebo._=Meebo._||[]).push(arguments)};
(function(q){

	var args = arguments;
	if (!document.body) { return setTimeout(function(){ args.callee.apply(this, args) }, 100); }
	var d=document, b=d.body, m=b.insertBefore(d.createElement('div'), b.firstChild); s=d.createElement('script');
	m.id='meebo'; m.style.display='none'; m.innerHTML='<iframe id="meebo-iframe"></iframe>';
	s.src='http'+(q.https?'s':'')+'://'+(q.stage?'stage-':'')+'cim.meebo.com/cim/cim.php?network='+q.network;
	b.insertBefore(s, b.firstChild);

})({network:'hoketronics_xu13ye'});	</script>	<item>
		<title>Subversion Install Swankiness Part 2</title>
		<link>http://hoketronics.net/2008/12/08/subversion-install-swankiness-part-2/</link>
		<comments>http://hoketronics.net/2008/12/08/subversion-install-swankiness-part-2/#comments</comments>
		<pubDate>Tue, 09 Dec 2008 00:16:37 +0000</pubDate>
		<dc:creator>mike.hochanadel</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Revision Control]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[revision control]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[Website]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[worpress]]></category>

		<guid isPermaLink="false">http://hoketronics.net/?p=53</guid>
		<description><![CDATA[Welcome back to part 2 of my Subversion install series.  What we are going to go over is developing the right structure for the repository, importing a website, updating a website, then testing and deploying the website using some of Subversion's command sets.  There were some road blocks along the way and I will talk [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_57" class="wp-caption aligncenter" style="width: 510px"><a href="/wp-content/uploads/2008/12/subversionpart2.png"><img class="size-full wp-image-57" title="Subersion Repository Snapshot" src="/wp-content/uploads/2008/12/subversionpart2.png" alt="Nothing Like A Fresh Subversion Import" width="500" height="350" /></a><p class="wp-caption-text">Nothing Like A Fresh Subversion Import</p></div>
<p>Welcome back to part 2 of my Subversion install series.  What we are going to go over is developing the right structure for the repository, importing a website, updating a website, then testing and deploying the website using some of Subversion's command sets.  There were some road blocks along the way and I will talk about that as well as some other thoughts about the process.  After that I'll talk about what's next but first let's setup and deploy some code.</p>
<p><span id="more-53"></span></p>
<p>The first step in molding the fresh install of Subversion into something workable, was to decide on what kind of structure I wanted to keep.  <a title="Setting Up Subversion for One or Multiple=">Articles</a> <a title="One SVN repository or many?" href="http://stackoverflow.com/questions/252459/one-svn-repository-or-many" target="_blank">online</a> <a title="One svn repo for multiple=">discussed</a> whether or not to keep multiple repositories for projects or maintain a single repository to house multiple projects.  In thinking of how I wanted it implemented, the simplicity of maintaining a single repository won over the cleanliness of revision management in multiple repositories.  Perhaps at a later date I can split it out or even incorporate Git, but for the purpose of getting started I'm going with one repository.</p>
<p>I decided to follow the <a title="Choosing Repository Setup" href="http://svnbook.red-bean.com/en/1.0/ch05s04.html#svn-ch-5-sect-6.1" target="_blank">svnbook's advice</a> of a creating a temporary directory structure to setup the initial framework of the repository.  In my case, there are three major areas I will develop in:  websites, scripts, and home related projects.  I created the structure and imported them in to Subversion using the <code>svn import</code> command.  After which, I deleted the temp directories and verified the structure below.  Here's the output:</p>
<p><code>hokey@tardis:~/tempdir$ sudo svn import . file:///var/svn/ --message 'Initial Repository Layout'<br />
[sudo] password for hokey:<br />
Adding         scripts<br />
Adding         headquarters<br />
Adding         web<br />
Adding         web/gonzoguys.com<br />
Adding         web/gonzoguys.com/trunk<br />
Adding         web/gonzoguys.com/branches<br />
Adding         web/gonzoguys.com/tags<br />
Adding         web/h0key.net<br />
Adding         web/h0key.net/trunk<br />
Adding         web/h0key.net/branches<br />
Adding         web/h0key.net/tags<br />
Adding         web/hoketronics.net<br />
Adding         web/hoketronics.net/trunk<br />
Adding         web/hoketronics.net/branches<br />
Adding         web/hoketronics.net/tags<br />
Adding         web/kccollegegameday.com<br />
Adding         web/kccollegegameday.com/trunk<br />
Adding         web/kccollegegameday.com/branches<br />
Adding         web/kccollegegameday.com/tags</code></p>
<p><code>Committed revision 1.<br />
hokey@tardis:~/tempdir$ svn list --verbose file:///var/svn<br />
1 root                  Nov 18 08:44 headquarters/<br />
1 root                  Nov 18 08:44 scripts/<br />
1 root                  Nov 18 08:44 web/<br />
hokey@tardis:~/tempdir$</code></p>
<p>It was time to work with local install of my website.  I copied the production code to my home folder on my local webserver.  After setting up the database and changing root path directives, I set about verifying the local page.   It looked good so I then downloaded the latest Wordpress package.  Following the directions, I copied the updated code and again verified the website.  The recent point releases didn't affect the database schema, so I was good on that end.</p>
<p>Now that I updated my code to the latest Wordpress point release, I imported the website into the Subversion repository.  Using <code>svn add</code>, I recursively added all of the new files from my website.  When it successfully added the file set, I committed the change using svn commit, complete with the initial import message.  Subversion pulls from CVS alot and these two commands reflect that.  It almost felt like I was greasing the code revision bicycle gears and getting back to the smooth ride of code management.</p>
<p>So now that I added the website files to the repository, I did it twice because of another point release in Wordpress, it was time to test and deploy the code.  Using the <code>svn export</code> command, I copied the code to the web docs directory on my local webserver.  I decided on doing that instead of checking out the repository on the live site because I'm on a shared hosting platform for production and I didn't want trailing '.svn' folders eating up space.  Plus it adds the benefit of greater security.</p>
<p><code>hokey@tardis:/var/www/hoketronics.net$ sudo svn export http://localhost/svn/web/hoketronics.net/trunk ./hoketronics.net</code></p>
<p>The code exported to the local server.  This is where I ran into some issues.  The code portion of the website works well in different directories, but I need to come up with a way to manage dev/test/prod databases for link resolution.  The logon screen for the local test install pointed to the local dev install.  Regardless of that little issue, the code tested out well.  Now it was time to deploy the website to my shared host, minus the config file.</p>
<p>The other issue I ran into was the process of updating my shared host with the new code.  I run Linux on the webserver locally but my workstation runs Windows XP.  The best way, I thought at the time, to copy the update was to compress the test folder, copy it to my workstation, and then use Filezilla to copy it up to my shared host.  This proved laborious and it ended up taking more time than I expected due to two reasons: remembering the correct compression one liner and not taking advantage of a command line ftp client on the local webserver.</p>
<p>That said, the production site on the shared host updated with no breaks.  I logged on, verified the version, and inspected both the UI and and the backend files for any issues.  The Subversion process was almost complete.  After I updated the code, I made note to change the initial work flow for updating my site to handle updates from the local webserver to the shared host.  Also, I'll take some time to flesh out different configs for my environments to avoid any path issues the next time around.  Lastly, I'm going to make sure I centralize my one liners for easier access, maybe even using the repository to keep track of additions.</p>
<p>Subversion seems like a great centralized source code management tool.  With my CVS experience under the belt, much of the commands feel familiar and comforting when I invoke them.  Now that I have the repository live, <a title="KC College Gameday" href="http://kccollegegameday.com" target="_blank">kccollegegameday.com</a> is getting some work.  I'm looking forward to checking the 'diffs' when modifying pages and themes.  Chances are you'll see me talk about that on top of a couple of article ideas due to the roadblocks experienced with this project.</p>
<img style='display:none' id="post-53-blankimage" onload="Meebo('discoverSharable', {element: this.parentNode,url:'http://hoketronics.net/2008/12/08/subversion-install-swankiness-part-2/',title:'Subversion Install Swankiness Part 2',tweet:'[caption id=\"attachment_57\" align=\"aligncenter\" width=\"500\" caption=\"Nothing Like A Fresh Subversion',description:'[caption id=\"attachment_57\" align=\"aligncenter\" width=\"500\" caption=\"Nothing Like A Fresh Subversion'})"><script type='text/javascript'>document.getElementById("post-53-blankimage").onload();</script>]]></content:encoded>
			<wfw:commentRss>http://hoketronics.net/2008/12/08/subversion-install-swankiness-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Subversion Install Swankiness Part I</title>
		<link>http://hoketronics.net/2008/11/08/subversion-install-swankiness-part-i/</link>
		<comments>http://hoketronics.net/2008/11/08/subversion-install-swankiness-part-i/#comments</comments>
		<pubDate>Sat, 08 Nov 2008 17:42:56 +0000</pubDate>
		<dc:creator>mike.hochanadel</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Revision Control]]></category>
		<category><![CDATA[Website]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[revision control]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://hoketronics.net/?p=36</guid>
		<description><![CDATA[Here we go with the newly decided first part of my Subversion install series.  I decided to break it up into smaller chunks of articles as the first part really is the installation/setup part and the second is the integration/deploying part.  So with this first part we're gonna talk about downloading, verification, repository setup, and [...]]]></description>
			<content:encoded><![CDATA[<p>Here we go with the newly decided first part of my Subversion install series.  I decided to break it up into smaller chunks of articles as the first part really is the installation/setup part and the second is the integration/deploying part.  So with this first part we're gonna talk about downloading, verification, repository setup, and Apache integration.  I'll make it short and sweet as possible but grab a cup of joe so we can get started.</p>
<p>When figuring out how I should download Subversion, I weighed many options.  I could either grab the source from their <a href="http://subversion.tigris.org">website at Tigris</a> or install from Ubuntu's repository.  The hardcore geek in me wanted to compile from source, but I really wanted to roll out the software quick so I can focus on the blog code.  Also  updates trickle down from Ubuntu with relative automation, so I went with acquiring the binary from Ubuntu.  It really makes sense to knock out the binaries for tools surrounding a project and focus on source for project related code.  Why waste your time setting up a utility when it's the poject you should be working on?</p>
<p><span id="more-36"></span></p>
<p>After some research, I decided to follow the steps <a title="Install Subversion with Web Access on Ubuntu" href="http://www.howtogeek.com/howto/ubuntu/install-subversion-with-web-access-on-ubuntu/" target="_blank">provided by How-To Geek</a>.  I updated my repository and installed Subversion.  After the packages were downloaded, unpacked, and installed, I verified that it had indeed been setup on my system.  Here's how it happened:</p>
<p><code>hokey@tardis:~$ sudo apt-get install subversion<br />
Reading package lists... Done<br />
Building dependency tree<br />
Reading state information... Done<br />
The following extra packages will be installed:<br />
libneon26 libsvn1<br />
Suggested packages:<br />
subversion-tools db4.4-util<br />
The following NEW packages will be installed:<br />
libneon26 libsvn1 subversion<br />
0 upgraded, 3 newly installed, 0 to remove and 3 not upgraded.<br />
Need to get 964kB of archives.<br />
After unpacking 5128kB of additional disk space will be used.<br />
Do you want to continue [Y/n]?</code></p>
<p><code>hokey@tardis:~$ svn --version<br />
svn, version 1.4.4 (r25188)<br />
compiled Sep 28 2007, 10:50:44</code></p>
<p><code>Copyright (C) 2000-2006 CollabNet.<br />
Subversion is open source software, see http://subversion.tigris.org/<br />
This product includes software developed by CollabNet (http://www.Collab.Net/).</code></p>
<p><code>The following repository access (RA) modules are available:</code></p>
<p><code>* ra_dav : Module for accessing a repository via WebDAV (DeltaV) protocol.<br />
- handles 'http' scheme<br />
- handles 'https' scheme<br />
* ra_svn : Module for accessing a repository using the svn network protocol.<br />
- handles 'svn' scheme<br />
* ra_local : Module for accessing a repository on local disk.<br />
- handles 'file' scheme</code></p>
<p>So after verification it was time to decide on where to create my new repository and setup web access.  Now with anything Linux-wise, you are pretty much left to your own notions as to where to drop a directory for installs.  Companies like Adobe use <code>/opt</code> for their application installs and some programs use <code>/var</code> to store data separate from program files.  I figured <code>/var/svn</code> was reasonable enough so I had at it, creating the directory and using the Subversion command <code>create</code> to setup the files:</p>
<p><code>hokey@tardis:/var$ sudo mkdir svn</code></p>
<p><code>hokey@tardis:/var$ sudo svnadmin create /var/svn/</code></p>
<p><code>hokey@tardis:/var$ cd svn<br />
hokey@tardis:/var/svn$ ls -lat<br />
total 36<br />
drwxr-xr-x  7 root root 4096 2008-11-07 17:54 .<br />
drwxr-xr-x  2 root root 4096 2008-11-07 17:54 conf<br />
drwxr-xr-x  2 root root 4096 2008-11-07 17:54 dav<br />
drwxr-sr-x  5 root root 4096 2008-11-07 17:54 db<br />
-r--r--r--  1 root root    2 2008-11-07 17:54 format<br />
drwxr-xr-x  2 root root 4096 2008-11-07 17:54 hooks<br />
drwxr-xr-x  2 root root 4096 2008-11-07 17:54 locks<br />
-rw-r--r--  1 root root  229 2008-11-07 17:54 README.txt<br />
drwxr-xr-x 15 root root 4096 2008-11-07 17:47 ..</code></p>
<p>Now that the repository was created, I needed to figure out how to get web access up.  Welp, thanks to the How-To Geek and the original coders of the module, there was one available to tie it all together.  Using <code>libapache2_svn</code>, a client can connect via Apache to a Subversion repository and write to it using DAV.  This was a perfect setup, even though the security isn't the greatest, for me to develop locally before deploying my sites to my host.  So here's how I did it:</p>
<p><code>hokey@tardis:/etc/apache2/mods-available$ sudo apt-get install libapache2-svn<br />
Reading package lists... Done<br />
Building dependency tree<br />
Reading state information... Done<br />
Suggested packages:<br />
db4.4-util<br />
The following NEW packages will be installed:<br />
libapache2-svn<br />
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.<br />
Need to get 136kB of archives.<br />
After unpacking 344kB of additional disk space will be used.<br />
Get:1 http://us.archive.ubuntu.com gutsy/main libapache2-svn 1.4.4dfsg1-1ubuntu3 [136kB]<br />
Fetched 136kB in 1s (126kB/s)<br />
Selecting previously deselected package libapache2-svn.<br />
(Reading database ... 30761 files and directories currently installed.)<br />
Unpacking libapache2-svn (from .../libapache2-svn_1.4.4dfsg1-1ubuntu3_i386.deb) ...<br />
Setting up libapache2-svn (1.4.4dfsg1-1ubuntu3) ...<br />
Enabling dav as a dependency<br />
Module dav installed; run /etc/init.d/apache2 force-reload to enable.<br />
Module dav_svn installed; run /etc/init.d/apache2 force-reload to enable.</code></p>
<p>After I installed the module, I had to edit the <code>dav_svn.conf</code> file to point to my settings.  Following the instructions, I removed the comments for configuration which included:</p>
<ul>
<li>Setting the repository location:<code>Location /var/svn</code></li>
<li>Uncommenting <code>DAV svn</code></li>
<li>Setting the SVNPath: <code>SVNPath /var/svn</code></li>
<li>And ucommenting the authority settings:<br />
<code>AuthType Basic<br />
AuthName "Subversion Repository"<br />
AuthUserFile <em>XXXXXX</em><br />
Require valid-user</code></li>
</ul>
<p>I then setup the authentication:<br />
<code>hokey@tardis:/etc/apache2/mods-enabled$sudo htpasswd -cm /etc/apache2/dav_svn.passwd hokey<br />
New password:<br />
Re-type new password:<br />
Adding password for user hokey</code></p>
<p>After doing a quick restart: <code>hokey@tardis:/etc/apache2/mods-enabled$ sudo apache2ctl restart</code>, I got this:</p>
<div id="attachment_37" class="wp-caption aligncenter" style="width: 478px"><a href="http://hoketronics.net/~/html/hoketronics.net/wp-content/uploads/2008/11/subversionwrong.png"><img class="size-full wp-image-37" title="subversionwrong" src="http://hoketronics.net/~/html/hoketronics.net/wp-content/uploads/2008/11/subversionwrong.png" alt="The wrong Location" width="468" height="374" /></a><p class="wp-caption-text">The wrong Location</p></div>
<p>What was wrong?  I set the Location for Apache as <code>/var/svn</code>.  What I was shooting for was to have <code>/svn</code> as the root.  Doh!  The SVNPath already tells Apache where to look for the repository.  The Location tag and attribute in the configuration tell Apache where to display it on the web server.  So I made the change and restarted.   After testing authentication, I was ready to rock.  Stay tuned for Part 2 of my swankiness as I look to integrate Subversion with a project and deploy it back to my host.</p>
<img style='display:none' id="post-36-blankimage" onload="Meebo('discoverSharable', {element: this.parentNode,url:'http://hoketronics.net/2008/11/08/subversion-install-swankiness-part-i/',title:'Subversion Install Swankiness Part I',tweet:'Here we go with the newly decided first part of my Subversion install series.  I decided to break i',description:'Here we go with the newly decided first part of my Subversion install series.  I decided to break i'})"><script type='text/javascript'>document.getElementById("post-36-blankimage").onload();</script>]]></content:encoded>
			<wfw:commentRss>http://hoketronics.net/2008/11/08/subversion-install-swankiness-part-i/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
