<?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>SolitaryGeek &#187; howto</title>
	<atom:link href="http://solitarygeek.com/tag/howto/feed" rel="self" type="application/rss+xml" />
	<link>http://solitarygeek.com</link>
	<description>James Selvakumar&#039;s Blog</description>
	<lastBuildDate>Tue, 21 Dec 2010 04:35:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Subversion and RapidSVN</title>
		<link>http://solitarygeek.com/linux/subversion-and-rapidsvn</link>
		<comments>http://solitarygeek.com/linux/subversion-and-rapidsvn#comments</comments>
		<pubDate>Fri, 14 Aug 2009 17:07:09 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[Version Control]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[rapidsvn]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.solitarygeek.com/linux/linux-subversion-rapidsvn-svn-ubuntu/</guid>
		<description><![CDATA[<p>Subversion is a very popular version control system. Though Subversion provides a very robust command line client, most of us prefer using a nice GUI front end. Windows users are really fortunate to have a powerful tool like TortoiseSVN which without any argument is simply the best front end for Subversion. Unfortunately, TortoiseSVN is available for just the Windows platform. Here I would like to highlight about RapidSVN, a cross-platform GUI front end for Subversion.</p> <p>This tutorial is directed towards new users of Linux or people who migrated from Windows to Linux recently. If you are a Windows user, TortoiseSVN <span style="color:#777"> . . . &#8594; Read More: <a href="http://solitarygeek.com/linux/subversion-and-rapidsvn">Subversion and RapidSVN</a></span>]]></description>
			<content:encoded><![CDATA[<p>Subversion is a very popular version control system. Though Subversion provides a very robust command line client, most of us prefer using a nice GUI front end. Windows users are really fortunate to have a powerful tool like TortoiseSVN which without any argument is simply the best front end for Subversion. Unfortunately, TortoiseSVN is available for just the Windows platform. Here I would like to highlight about RapidSVN, a cross-platform GUI front end for Subversion.</p>
<p>This tutorial is directed towards new users of Linux or people who migrated from Windows to Linux recently. If you are a Windows user, TortoiseSVN might be the best bet for you. Learn more about TortoiseSVN from the post &#8220;<a href="http://www.solitarygeek.com/version-control/extending-subversion-by-using-tortoisesvn/">Extending Subversion by using TortoiseSVN</a>&#8220;.</p>
<p><span id="more-329"></span></p>
<p><strong>Pre-requisites<br />
</strong>Subversion<br />
<strong><br />
Installation<br />
</strong>Installing RapidSVN in Ubuntu is a breeze,</p>
<pre lang="bash">sudo apt-get install rapidsvn</pre>
<p>Once installation is done, RapidSVN can be found under &#8220;Applications -&gt; Programming&#8221;. Or if you use a dock like <a href="http://do.davebsd.com/">GNOME-Do</a>, you can launch it by typing &#8220;rapidsvn&#8221;.</p>
<p>For other platforms, download the latest release from the <a href="http://www.rapidsvn.org/download/release/">RapidSVN</a> site.</p>

<p><strong>Adding a repository to RapidSVN<br />
</strong>Unlike TortoiseSVN which seamlessly integrates into Windows Explorer, RapidSVN allows you to manage the files from a dedicated user interface. RapidSVN will display details like status, author, revision number etc in separate columns.</p>
<p><img style="max-width: 800px;" src="http://solitarygeek.com/blog/wp-content/uploads/2009/08/Screenshot1-p.png" alt="" /></p>
<p>To add a new repository to RapidSVN, right click &#8220;Bookmarks&#8221;, click &#8220;Add Existing Repository&#8221; and enter the repository url.</p>
<p><img style="max-width: 800px;" src="http://solitarygeek.com/blog/wp-content/uploads/2009/08/screenshot20-p.png" alt="" /></p>
<p><img style="max-width: 800px;" src="http://solitarygeek.com/blog/wp-content/uploads/2009/08/screenshot3-p1.png" alt="" /></p>
<p><strong>Checkout a working copy</strong><br />
To checkout a working copy from the repository, right click a repository, click &#8220;Checkout New Working Copy&#8221; and enter appropriate details.</p>
<p><img style="max-width: 800px;" src="http://solitarygeek.com/blog/wp-content/uploads/2009/08/screenshot4-p.png" alt="" /></p>
<p>RapidSVN will display any unversioned files in your working copy, if any.</p>
<p><img style="max-width: 800px;" src="http://solitarygeek.com/blog/wp-content/uploads/2009/08/screenshot5-p.png" alt="" /></p>
<p><strong>Adding files to working copy</strong><br />
Right click any unversioned file and then click &#8220;Add&#8221; to add them in your working copy. Click &#8220;Add recursive&#8221; if you want to add a folder with multiple sub folders inside it.</p>
<p><img style="max-width: 800px;" src="http://solitarygeek.com/blog/wp-content/uploads/2009/08/screenshot7-p.png" alt="" /></p>
<p>RapidSVN will display appropriate status regarding the files that are added in your working copy but not yet committed to the repository.</p>
<p><img style="max-width: 800px;" src="http://solitarygeek.com/blog/wp-content/uploads/2009/08/screenshot8-p.png" alt="" /></p>
<p><strong>Commiting changes</strong><br />
You can commit the added files, modified files by right clicking them and selecting &#8220;Commit&#8221;.</p>
<p><img style="max-width: 800px;" src="http://solitarygeek.com/blog/wp-content/uploads/2009/08/screenshot9-p.png" alt="" /></p>
<p><img style="max-width: 800px;" src="http://solitarygeek.com/blog/wp-content/uploads/2009/08/screenshot10-p.png" alt="" /></p>
<strong><br />
Updating working copy</strong><br />
Right click your working copy in the RapidSVN sidebar and click &#8220;Update&#8221; to update your working copy.</p>
<p><img style="max-width: 800px;" src="http://solitarygeek.com/blog/wp-content/uploads/2009/08/screenshot11-p.png" alt="" /></p>
<p><strong>View history (Log)</strong><br />
To view the change history of a file, right click a file and select &#8220;Log&#8221;.</p>
<p><img style="max-width: 800px;" src="http://solitarygeek.com/blog/wp-content/uploads/2009/08/screenshot12-p.png" alt="" /></p>
<p><strong>Reverting local changes</strong><br />
Right click a modified file and click &#8220;Revert&#8221; to revert the changes you made to your working copy.</p>
<p><img style="max-width: 800px;" src="http://solitarygeek.com/blog/wp-content/uploads/2009/08/screenshot13-p.png" alt="" /></p>
<p><strong>Compare the changes made (Diff)</strong><br />
Unlike TortoiseSVN, RapidSVN does not provide built in support for &#8220;Diff&#8221;. However, you can instruct RapidSVN to use any externl diff tool to fill that gap. So this is what you will see when you attempt to run &#8220;Diff&#8221; on a file,</p>
<p><img style="max-width: 800px;" src="http://solitarygeek.com/blog/wp-content/uploads/2009/08/screenshot14.png" alt="" /></p>
<p>Fortunately, there are many excellent &#8220;Diff&#8221; tools available. I use &#8220;Meld&#8221; as the diff tool in Ubuntu Linux. &#8220;Meld&#8221; should be available in all major Linux distros. This is how you will install &#8220;Meld&#8221; in Ubuntu,</p>
<pre lang="bash">sudo apt-get install meld
</pre>
<p>Once you have your diff tool of choice installed, you need to tell RapidSVN to use the diff tool. In RapidSVN, click &#8220;View -&gt; Preferences&#8221; and then open the &#8220;Programs&#8221; tab. In the &#8220;Programs&#8221; tab, look for a section called &#8220;Diff Tool&#8221; and enter the command name there and save the changes.</p>
<p><img style="max-width: 800px;" src="http://solitarygeek.com/blog/wp-content/uploads/2009/08/screenshot15.png" alt="" /></p>
<p>Now you can diff the changes made to a file by right clicking it and selecting &#8220;Diff&#8221; or &#8220;Diff to Head&#8221; or &#8220;Diff to Base&#8221;.</p>
<p><img style="max-width: 800px;" src="http://solitarygeek.com/blog/wp-content/uploads/2009/08/screenshot16.png" alt="" /></p>
<p>Once you click &#8220;OK&#8221;, RapidSVN will invoke the respective Diff tool to display the differences.</p>
<p><img style="max-width: 800px;" src="http://solitarygeek.com/blog/wp-content/uploads/2009/08/screenshot17-p.png" alt="" /></p>
<p><strong>Other Settings</strong><br />
If you want to open and edit files right from within RapidSVN, open &#8220;Edit -&gt; Preferences&#8221; and then enter the appropriate value in the &#8220;Standard Editor&#8221; section.</p>
<p><img style="max-width: 800px;" src="http://solitarygeek.com/blog/wp-content/uploads/2009/08/screenshot18-p.png" alt="" /></p>
<p>If you want to explore your working copy from within RapidSVN, then configure the &#8220;Standard Explorer&#8221; section in &#8220;Preferences&#8221;.</p>
<p><img style="max-width: 800px;" src="http://solitarygeek.com/blog/wp-content/uploads/2009/08/screenshot19-p.png" alt="" /></p>
<p>Overall, RapidSVN is a solid Subversion client especially to linux users. What Subversion client do you use?</p>
<p><strong>SolitaryGeek Poll</strong></p>
<p>Note: There is a poll embedded within this post, please visit the site to participate in this post's poll.
<div class="zemanta-pixie"><img class="zemanta-pixie-img" src="http://img.zemanta.com/pixy.gif?x-id=b7261b0a-249c-8510-b5af-4f03347146b8" alt="" /></div>
]]></content:encoded>
			<wfw:commentRss>http://solitarygeek.com/linux/subversion-and-rapidsvn/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Hudson CI Server &#8211; A quick start guide</title>
		<link>http://solitarygeek.com/java/hudson-ci-server-a-step-by-step-guide-part-i</link>
		<comments>http://solitarygeek.com/java/hudson-ci-server-a-step-by-step-guide-part-i#comments</comments>
		<pubDate>Fri, 24 Jul 2009 14:53:26 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[NetBeans]]></category>
		<category><![CDATA[build]]></category>
		<category><![CDATA[continuous-integration]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[hudson]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.solitarygeek.com/?p=120</guid>
		<description><![CDATA[<p>Introduction</p> <p> Continuous Integration is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily &#8211; leading to multiple integrations per day. - Martin Fowler</p> <p> Hudson is a popular open-source continuous integration server used by many organizations like Redhat JBoss. Though there are many well known and well established open-source projects like CruiseControl, Continnum and some commercial offerings like Bamboo, what makes Hudson special is it&#8217;s powerful yet easy to use web interface, it&#8217;s simplicity and it&#8217;s extensible architecture with many plugins.</p> <p> Objective</p> <p> The objective of this <span style="color:#777"> . . . &#8594; Read More: <a href="http://solitarygeek.com/java/hudson-ci-server-a-step-by-step-guide-part-i">Hudson CI Server &#8211; A quick start guide</a></span>]]></description>
			<content:encoded><![CDATA[<p><strong>Introduction</strong></p>
<p><strong> </strong> Continuous Integration is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily &#8211; leading to multiple integrations per day.<br />
- <a href="http://martinfowler.com/articles/continuousIntegration.html">Martin Fowler</a></p>
<p><span> </span><span><a href="https://hudson.dev.java.net/">Hudson</a></span><span> is a popular open-source continuous integration server used by many organizations like Redhat <a href="http://hudson.jboss.org/hudson/">JBoss</a>. Though there are many well known and well established open-source projects like <a href="http://cruisecontrol.sourceforge.net/">CruiseControl</a>, <a href="http://continuum.apache.org/">Continnum</a></span><span> and some commercial offerings like <a href="http://www.atlassian.com/software/bamboo/">Bamboo</a>, what makes </span><span>Hudson special is it&#8217;s powerful yet easy to use web interface, it&#8217;s simplicity and it&#8217;s extensible architecture with many plugins.</span></p>
<p><span><span id="more-120"></span></span><span><br />
</span><span><strong>Objective</strong></span></p>
<p><span><strong> </strong>The objective of this tutorial is to setup, configure and learn to use <a href="https://hudson.dev.java.net/">Hudson</a> by building &#8220;<a href="http://commons.apache.org/io/">Apache Commons IO</a>&#8220;, a well known java project.<br />
<strong><br />
</strong></span><span><strong>Requirements<br />
</strong></span></p>
<ul>
<li><span><a href="https://hudson.dev.java.net/">Hudson</a></span></li>
<li><span>Subversion (or any other version control system like CVS, Mercurial, Git if you want to build your own project)<br />
</span></li>
<li><span>(Optional) <a href="http://tomcat.apache.org/">Tomcat</a> or <a href="https://glassfish.dev.java.net/">Glassfish</a></span></li>
<li><span>Apache Ant (or Maven)<br />
</span></li>
</ul>
<p><span><strong>Installation and Starting Hudson</strong></span></p>
<p><span>Installing Hudson is super easy. Just download the <a href="http://hudson-ci.org/latest/hudson.war">war</a> file, open your terminal/command-prompt and issue the command &#8220;java -jar hudson.war&#8221;. Now point your browser to <a href="http://localhost:8080">http://localhost:8080</a>. That was easy, right?</span></p>
<p><span>Hudson has an embedded servlet container called &#8220;<a href="http://winstone.sourceforge.net/">Winstone</a>&#8221; which works much like a standard servlet container like Tomcat by serving your JSP pages and servlets.</span></p>
<p><span>If you want Hudson to start on a different port, say 8180, issue the following command,<br />
&lt;code&gt; java -jar hudson.war &#8211;httpPort=8180 &lt;/code&gt;</span></p>
<p><span>Ofcourse you can deploy Hudson to Tomcat, Glassfish or any other supported servlet containers. The following guides can be useful in that case:<br />
</span></p>
<ul>
<li><span><a href="http://wiki.hudson-ci.org/display/HUDSON/Tomcat">Hudson and Tomcat</a></span></li>
<li><span><a href="https://hudson.dev.java.net/containers/glassfish.html">Hudson and Glassfish</a></span></li>
</ul>
<p><span>More container specific guides can be found from this <a href="http://wiki.hudson-ci.org/display/HUDSON/Containers">hudson wiki</a>.</span></p>
<p><span>Once you started Hudson or deployed it to a servlet container, this is what you might see in your browser when you start Hudson for the first time.</span></p>
<p><span><img style="max-width: 800px;" src="http://solitarygeek.com/blog/wp-content/uploads/2009/07/hudson1-p.png" alt="" /></span></p>
<p><span><strong>Hudson Home Directory</strong></span></p>
<p><span>All your Hudson jobs/settings are stored in the Hudson home directory. If you did not specify one, Hudson shall assume some defaults like &lt;code&gt; ~/.hudson &lt;/code&gt; in Linux or your respective home directory in Windows. It&#8217;s ok to go ahead with the defaults while you test drive Hudson but once you are done, I strongly recommend you to define a Hudson home directory of your choice, preferrably on a separate partition or drive. This will ensure that all your Hudson configuration/jobs are intact in case of any system crash.</span></p>
<p><span>Say, suppose your home directory is &#8220;/hudson&#8221; (in Linux), this is how you will define the Hudson home directory,</span></p>
<p><span>If you are using the embedded servlet container,<em> </em>start it by specifying the java system property &#8220;HUDSON_HOME&#8221;,<br />
&lt;code&gt; java -DHUDSON_HOME=/hudson -jar hudson.war &lt;/code&gt;</span></p>
<p><span>If you are using Tomcat, follow the explanations in <a href="http://wiki.hudson-ci.org/display/HUDSON/Tomcat">this wiki</a>. However, if you run Tomcat as a windows service, you need to do some tweaking to let Tomcat set this property. In that case, you will be better off if you start Tomcat using it&#8217;s batch file and set the property right there. (Or if you managed to run Tomcat as a Windows Service and still able to define the Hudson home correctly, why don&#8217;t you share your views with us?)</span></p>
<p><span>If you are using Glassfish, go to admin console and add the JVM option &lt;code&gt; -DHUDSON_HOME=/hudson&lt;/code&gt;. More detailed explanations can be found on <a href="http://wiki.hudson-ci.org/display/HUDSON/Glassfish">this wiki</a>.</span></p>
<p><span>Just remember that the idea is to define a system property &#8220;HUDSON_HOME&#8221; through any of the possible ways.</span></p>
<p><span>This is how the Hudson home directory shall look like.</span></p>
<p><span><img style="max-width: 800px;" src="http://solitarygeek.com/blog/wp-content/uploads/2009/07/hudson2-p.png" alt="" /></span></p>
<p><span><strong>Manage Hudson</strong></span></p>
<p><span><strong> </strong>Hudson provides an easy to use web interface to manage the configurations needed to administer a continuous integration server. Let us do some basic configurations to get Hudson ready.</span></p>
<p><span>Start Hudson and click the &#8220;Manage Hudson&#8221; link located on the left. </span></p>
<p><span><img style="max-width: 800px;" src="http://solitarygeek.com/blog/wp-content/uploads/2009/07/hudson3-p.png" alt="" /></span></p>
<p><span>Now click &#8220;Configure System&#8221;. Hudson will display a page where you can configure things like access control, JDK, Ant, Email Settings etc.<br />
</span></p>
<p><span><img style="max-width: 800px;" src="http://solitarygeek.com/blog/wp-content/uploads/2009/07/hudson4-p.png" alt="" /></span></p>
<p><span><em><strong>Access Control</strong></em></span></p>
<p><span><em> </em>We will enable security to secure our Hudson setup. Otherwise anybody can go and meddle with your Hudson jobs. If you don&#8217;t want that to happen, check the &#8220;Enable Security&#8221; checkbox.</span></p>
<p><span><img class="alignnone size-full wp-image-128" title="hudson4a-3-p" src="http://solitarygeek.com/blog/wp-content/uploads/2009/07/hudson4a-3-p.png" alt="hudson4a-3-p" width="498" height="76" /></span></p>
<p><span><br />
</span></p>
<p><span> </span></p>
<p><span>Once security is enabled, we need to tell Hudson the type of &#8220;Access Control&#8221; we want to use. Let us choose the Security Realm as &#8220;Hudson&#8217;s own user database&#8221; and leave the option &#8220;Enable users to signup&#8221; as checked. (If you do not check the &#8220;sign up&#8221; option here, Hudson is definitely going to whack you later!. ) Under the &#8220;Authorization&#8221; section, choose &#8220;Matrix-based Security&#8221;.</span></p>
<p><span><img class="alignnone size-full wp-image-129" title="hudson4a-4-p" src="http://solitarygeek.com/blog/wp-content/uploads/2009/07/hudson4a-4-p.png" alt="hudson4a-4-p" width="382" height="330" /><br />
</span></p>
<p><span> </span></p>
<p><span>Now add an user called &#8220;administrator&#8221; and give the necessary privileges. ENSURE THAT YOU GIVE &#8220;ADMINISTER&#8221; PRIVILEGES TO THIS USER or else, you may not able to access the administrative console once security and access control are enabled. (Again, if you miss it, Hudson is gonna whack you!)</span></p>
<p><span><img class="alignnone size-full wp-image-130" title="hudson6-1-p" src="http://solitarygeek.com/blog/wp-content/uploads/2009/07/hudson6-1-p.png" alt="hudson6-1-p" width="579" height="118" /><br />
</span></p>
<p><span> </span></p>
<p><span>Hudson will display an error symbol near the user we just added. That&#8217;s because the user does not exist  in the system. Do not bother, we will create the user a little later. Now go ahead and add users who might be accessing Hudson. Give appropriate access controls to the users and do not give full access to everyone. That will eventually create a system that is difficult to manage. </span></p>
<p><span><img style="max-width: 800px;" src="http://solitarygeek.com/blog/wp-content/uploads/2009/07/hudson7-p.png" alt="" /></span></p>
<p><span><strong><em>Configure JDK</em></strong></span></p>
<p><span>Done with security? Now we need to configure the JDK which Hudson shall use to build the jobs. Find out the section &#8220;JDK&#8221; in the same page. Click the &#8220;Add JDK&#8221; button and then enter the details of your JDK.</span></p>
<p><span><img style="max-width: 800px;" src="http://solitarygeek.com/blog/wp-content/uploads/2009/07/hudson9-p.png" alt="" /></span></p>
<p><span><em><strong>Configure Ant</strong></em></span></p>
<p><span><em> </em>We need to tell Hudson where Ant is located. Find out the section called &#8220;Ant&#8221;, click &#8220;Add Ant&#8221; and enter the respective details.</span></p>
<p><span><img style="max-width: 800px;" src="http://solitarygeek.com/blog/wp-content/uploads/2009/07/hudson10-p.png" alt="" /></span></p>
<p><span>(Follow the same procedure, if you want to configure Maven.)</span></p>
<p><span>That&#8217;s it! Hudson is now almost ready for prime time. Feel free to configure the Email Settings as well with the appropriate values. When you are done, press the &#8220;Save&#8221; button to save all the changes you have made.</span></p>
<p><span>Once you press the &#8220;Save&#8221; button, Hudson will redirect you to a login page.</span></p>
<p><span><em><strong>Manage Users</strong></em></span></p>
<p><span><em> </em>Click the &#8220;Signup&#8221; link at the top right corner of Hudson and register a new user called &#8220;administrator&#8221; (or whatever name you gave in the &#8220;Access Control&#8221; section).</span></p>
<p><span><img style="max-width: 800px;" src="http://solitarygeek.com/blog/wp-content/uploads/2009/07/hudson13-p.png" alt="" /></span></p>
<p><span>Hudson will automatically login the user provided the user was already configured in the &#8220;Access Control&#8221; section. Once a new user (administrator) is registered in the system, Hudson will provide an option called &#8220;Manage Users&#8221; in the &#8220;Manage Hudson&#8221; page.</span></p>
<p><span><img style="max-width: 800px;" src="http://solitarygeek.com/blog/wp-content/uploads/2009/07/hudson15-p.png" alt="" /></span></p>
<p><span>You can now create other users from this page.</span></p>
<p><span><img class="alignnone size-full wp-image-125" title="hudson16-1-p" src="http://solitarygeek.com/blog/wp-content/uploads/2009/07/hudson16-1-p.png" alt="hudson16-1-p" width="345" height="183" /><br />
</span></p>
<p><span>You will be using this page to manage all your Hudson users. Looks like we have covered quite a lot of information. It&#8217;s time now to create some jobs and see Hudson in action.</span></p>
<p><span><strong>Creating Job</strong></span></p>
<p><span><strong> </strong>That&#8217;s the core feature of Hudson. Hudson jobs can fetch the source code from a repository, execute your build scripts, run your tests, prepare javadoc, notify you in case of any failure, archive the build artifacts and much more. That&#8217;s where you can really see the power of Hudson. Enough talking, let us explore these Hudson features now by creating a job.</span></p>
<p><span>The Hudson job which we are going to create now is going to be very simple and is capable of doing the following:<br />
</span></p>
<ul>
<li><span>Checkout the source code of <a href="http://commons.apache.org/io/">apache commons-io</a> project using subversion<br />
</span></li>
<li><span>Run the build script (build.xml in case of Ant, pom.xml for Maven)</span></li>
<li><span>Archive the build output<br />
</span></li>
</ul>
<p><span>Create a job by clicking the link &#8220;New Job&#8221; on the left. Give a name for the job, select the option &#8220;Build a free-style software project&#8221; and then press &#8220;OK&#8221;.</span></p>
<p><span><img style="max-width: 800px;" src="http://solitarygeek.com/blog/wp-content/uploads/2009/07/hudson18-p.png" alt="" /></span></p>
<p><span><strong>Configure Job</strong><br />
</span></p>
<p><span> Hudson will create a new empty job for us which we need to configure.</span></p>
<p><span><img class="alignnone size-full wp-image-127" title="hudson19-1-p" src="http://solitarygeek.com/blog/wp-content/uploads/2009/07/hudson19-1-p.png" alt="hudson19-1-p" width="496" height="253" /><br />
</span></p>
<p><span> </span></p>
<p><span>Let us configure the repository for this job first. Go to the section &#8220;Source Code Management&#8221;, choose the option &#8220;Subversion&#8221; and enter the repository url  as &#8220;<a href="http://svn.apache.org/repos/asf/commons/proper/io/trunk">http://svn.apache.org/repos/asf/commons/proper/io/trunk</a>&#8220;. Enter the &#8220;Local module directory&#8221; as  &#8220;.&#8221;</span></p>
<p><span><img style="max-width: 800px;" src="http://solitarygeek.com/blog/wp-content/uploads/2009/07/hudson20-p.png" alt="" /></span></p>
<p><span>Look for the section called &#8220;Build&#8221;. Click the button &#8220;Add build step&#8221; and select &#8220;Invoke Ant&#8221;. Leave the rest to default. (Maven users, choose the appropriate action)</span></p>
<p><span><img style="max-width: 800px;" src="http://solitarygeek.com/blog/wp-content/uploads/2009/07/hudson22-p1.png" alt="" /></span></p>
<p><span><img style="max-width: 800px;" src="http://solitarygeek.com/blog/wp-content/uploads/2009/07/hudson23-p.png" alt="" /><br />
Go to the section &#8220;Post-build Actions&#8221;. Select the checkbox &#8220;Archive the artifacts&#8221;. The apache commons-io build script shall create the jar in the directory named &#8220;target&#8221;. So enter the value &#8220;target/*.jar&#8221; in the text field titled &#8220;Files to archive&#8221;. Though this is not mandatory to build a job, I recommend you to do this as this will help the users of your continuous integration server to download the build outputs quickly.</span></p>
<p><span><img style="max-width: 800px;" src="http://solitarygeek.com/blog/wp-content/uploads/2009/07/hudson24-p.png" alt="" /></span></p>
<p><em><span> NOTE: Since we are building the apache-commons-io project we are entering the value &#8220;target/*.jar&#8221;. If for example, your build output directory is &#8220;dist&#8221;, then you should enter here as &#8220;dist/*.jar&#8221;.</span><br />
</em><span><br />
Press the &#8220;Save&#8221; button at the bottom. Our job is ready and just click link &#8220;Build Now&#8221; at the left to start building the job.</span></p>
<p><span><img style="max-width: 800px;" src="http://solitarygeek.com/blog/wp-content/uploads/2009/07/hudson25-p.png" alt="" /></span></p>
<p><span>Once the build is initiated, you can relax and watch the progress in the &#8220;Build History&#8221;.</span></p>
<p><span><img style="max-width: 800px;" src="http://solitarygeek.com/blog/wp-content/uploads/2009/07/hudson26-p.png" alt="" /></span></p>
<p><span>If you are restless and want to see exactly what is going on, just click the link (corresponding to the build number) in the &#8220;Build History&#8221;.</span></p>
<p><span><img style="max-width: 800px;" src="http://solitarygeek.com/blog/wp-content/uploads/2009/07/hudson27-p.png" alt="" /></span></p>
<p><span>Now click the link &#8220;Console Output&#8221;.</span></p>
<p><span><img style="max-width: 800px;" src="http://solitarygeek.com/blog/wp-content/uploads/2009/07/hudson28-p.png" alt="" /></span></p>
<p><span>Hudson will display you the console view where you can do all your research.</span></p>
<p><span><br />
</span></p>
<p><span><img style="max-width: 800px;" src="http://solitarygeek.com/blog/wp-content/uploads/2009/07/hudson29-p.png" alt="" /></span></p>
<p><span>Now that the build is successful, you might want to have a look at the jar built by this job. You can find that under &#8220;Last Successful Artifacts&#8221;. </span></p>
<p><span><img style="max-width: 800px;" src="http://solitarygeek.com/blog/wp-content/uploads/2009/07/hudson30-p.png" alt="" /></span></p>
<p><span>You can also have a sneak preview about the builds from your Hudson home page.</span></p>
<p><span><img style="max-width: 800px;" src="http://solitarygeek.com/blog/wp-content/uploads/2009/07/hudson31-p.png" alt="" /></span></p>
<p><span>If in case some of your builds failed, Hudson will report that as well neatly along with displaying the build stability. </span></p>
<p><span><img style="max-width: 800px;" src="http://solitarygeek.com/blog/wp-content/uploads/2009/07/hudson32-p.png" alt="" /></span></p>
<p><span>That&#8217;s it for now. But you can do a lot more like configuring Hudson to build this job every few minutes or just poll the repository once in a while and trigger the build whenever someone commits to the repository. Explore them under the job&#8217;s configuration page and enjoy. And did I mention that Hudson has a lot of good plugins already? Maybe I will try to cover those advanced concepts in my next post.</span></p>
<p><span>If you are using NetBeans as your IDE, then you have a got a lot of Hudson features integrated right into the NetBeans IDE. Check that out in my post <a href="http://www.solitarygeek.com/java/netbeans-6-7-a-quick-glance/">NetBeans 6.7 &#8211; A quick glance</a>.</span></p>
<p><span>Are you using Hudson? Are you planning to use Hudson? Why not leave a comment below and share your thoughts?</span></p>
<p><span>Read also: &#8220;<a href="http://solitarygeek.com/java/netbeans-and-maven-a-quick-start-guide">NetBeans and Maven &#8211; A quick start guide</a>&#8221;<br />
</span></p>
]]></content:encoded>
			<wfw:commentRss>http://solitarygeek.com/java/hudson-ci-server-a-step-by-step-guide-part-i/feed</wfw:commentRss>
		<slash:comments>27</slash:comments>
		</item>
		<item>
		<title>Convert video files to mp3 in Ubuntu</title>
		<link>http://solitarygeek.com/linux/linux-ubuntu-video-converter-dat-converter</link>
		<comments>http://solitarygeek.com/linux/linux-ubuntu-video-converter-dat-converter#comments</comments>
		<pubDate>Sun, 12 Jul 2009 09:53:09 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[multimedia]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[video-converter]]></category>
		<category><![CDATA[videos]]></category>

		<guid isPermaLink="false">http://www.solitarygeek.com/general/linux-ubuntu-video-converter-dat-converter/</guid>
		<description><![CDATA[<p>In my previous post, I explained how to convert audio files from one format to another in Ubuntu. Ubuntu provides native support for this through Sound Converter which can be installed using a simple command. After trying Sound Converter, I was confident that there will be similar applications to convert video files. That made me to install applications like WinFF, Avidemux.</p> <p>My objective was to convert *.DAT files from a VCD into *.mp3. I decided to try WinFF first. The interface was pretty simple to use.</p> <p></p> <p> </p> <p>But when I pressed the &#8220;Convert&#8221; button, I got the following <span style="color:#777"> . . . &#8594; Read More: <a href="http://solitarygeek.com/linux/linux-ubuntu-video-converter-dat-converter">Convert video files to mp3 in Ubuntu</a></span>]]></description>
			<content:encoded><![CDATA[<p><span>In my <a href="http://www.solitarygeek.com/linux/convert-audio-files-in-ubuntu-with-sound-converter/">previous post</a>, </span><span>I explained how to convert audio files from one format to another in Ubuntu. Ubuntu provides native support for this through Sound Converter which can be installed using a simple command. After trying Sound Converter, I was confident that there will be similar applications to convert video files. That made me to install applications like WinFF, Avidemux.</span></p>
<p><span>My objective was to convert *.DAT files from a VCD into *.mp3. I decided to try WinFF first. The interface was pretty simple to use.</span></p>
<p><span><span id="more-62"></span></span></p>
<p><span><img style="max-width: 800px;" src="http://solitarygeek.com/blog/wp-content/uploads/2009/07/screenshot12.png" alt="" /> </span></p>
<p><span>But when I pressed the &#8220;Convert&#8221; button, I got the following message,</span></p>
<p><span><img style="max-width: 800px;" src="http://solitarygeek.com/blog/wp-content/uploads/2009/07/screenshot22.png" alt="" /><br />
</span><br />
<span>WinFF reported that the encoder &#8216;libmp3lame&#8217; is unknown. I tried to install that via apt-get but could not find that in the repository as well. I tried to convert to other formats but in vain. I understand that I miss some libraries/encoders, but the help message was not very useful. The application could have suggested me to install the respective library like Sound Converter does for &#8220;mp3&#8243; support.</span></p>

<p><span>Since WinFF failed to get the job done for me, I tried Avidemux this time. When I started avidemux, I quickly realised that this not going to be an application which everyone can use effortlessly. Avidemux might be a great tool but unless it gets a decent user interface it&#8217;s not going to be used by many. But since I was determined to convert my video files, I proceeded ahead with Avidemux.</span></p>
<p><span><img style="max-width: 800px;" src="http://solitarygeek.com/blog/wp-content/uploads/2009/07/screenshot32.png" alt="" /></span></p>
<p><span>When I tried to load the &#8220;DAT&#8221; file, Avidemux complained that it could not open that file.</span></p>
<p><span><img style="max-width: 800px;" src="http://solitarygeek.com/blog/wp-content/uploads/2009/07/screenshot41.png" alt="" /></span></p>
<p><span>I searched the <a href="http://www.avidemux.org/admWiki/index.php?title=Main_Page">Avidemux wiki</a> but still couldn&#8217;t solve the problem. My search continued and in one forum I got a suggestion that I can rename the file to &#8220;mpg&#8221; and change the &#8220;video&#8221;, &#8220;audio&#8221; options to &#8220;MPEG-4 ASP (Xvid4)&#8221;, &#8220;MP3 Lame&#8221; respectively. But the result was same. Avidemux couldn&#8217;t open the file.</span></p>
<p><span><br />
</span></p>
<p><span>Then I realised that another user had the <a href="http://mintarticles.com/read/articles_about_software/best_linux_ubuntu_videoaudio_converter_format_factory_and_wine,1024/">same frustrations</a> like me and eventually opted to run the popular windows only tool FormatFactory on top of Wine. I decided to follow suit but I thought of trying out AnyVideoConverter on top of Wine. But AnyVideoConverter failed to start which left me with no options but to turn for FormatFactory.</span></p>
<p><span>I downloaded and installed FormatFactory using Wine and it started without any issues on my Ubuntu.</span></p>
<p><span><img style="max-width: 800px;" src="http://solitarygeek.com/blog/wp-content/uploads/2009/07/screenshot51.png" alt="" /></span></p>
<p><span>Since I wanted to convert video files into &#8220;MP3&#8243; format, I clicked the &#8220;Audio&#8221; tab in the left pane and chose the option &#8220;All to MP3&#8243;. Then I was prompted to add the necessary files.</span></p>
<p><span><img style="max-width: 800px;" src="http://solitarygeek.com/blog/wp-content/uploads/2009/07/screenshot61.png" alt="" /></span></p>
<p><span>Once I added the necessary files, all I had to do was to click &#8220;Start&#8221; button.</span></p>
<p><span><img style="max-width: 800px;" src="http://solitarygeek.com/blog/wp-content/uploads/2009/07/screenshot71.png" alt="" /></span></p>
<p><span>After a few seconds, FormatFactory successfully converted the &#8220;DAT&#8221; files into &#8220;MP3&#8243; format.</span></p>
<p><span><img style="max-width: 800px;" src="http://solitarygeek.com/blog/wp-content/uploads/2009/07/screenshot81.png" alt="" /></span></p>
<p><span>Thanks to FormatFactory and Wine, I was able to convert &#8220;DAT&#8221; files without booting into Windows. Many thanks to this <a href="http://mintarticles.com/read/articles_about_software/best_linux_ubuntu_videoaudio_converter_format_factory_and_wine,1024/">wonderful article</a> which was an eye opener for me.</span></p>
<p><span>I haven&#8217;t yet tried the FormatFactory|Wine combination to convert my videos into other format. Why don&#8217;t you try it and share your experience with us?<br />
</span></p>
]]></content:encoded>
			<wfw:commentRss>http://solitarygeek.com/linux/linux-ubuntu-video-converter-dat-converter/feed</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Convert audio files in Ubuntu with Sound Converter</title>
		<link>http://solitarygeek.com/linux/convert-audio-files-in-ubuntu-with-sound-converter</link>
		<comments>http://solitarygeek.com/linux/convert-audio-files-in-ubuntu-with-sound-converter#comments</comments>
		<pubDate>Sat, 11 Jul 2009 06:25:01 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[audio-converter]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[multimedia]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.solitarygeek.com/general/convert-audio-files-in-ubuntu-with-sound-converter/</guid>
		<description><![CDATA[<p>&#8220;Linux lacks good multimedia applications&#8220;. How many times have we heard this! This was my perception as well. Not that I do my living based on these tools but I do use them often at home. Atleast, many of us might be in a need to convert audio/video from one format to another and rip tracks out of audio cds.</p> <p>Traditionally I use softwares like Any Video Converter, Format Factory to convert audio/video files but unfortunately they are available only on Windows and I had to boot into my old Windows XP in order to use them. I thought I <span style="color:#777"> . . . &#8594; Read More: <a href="http://solitarygeek.com/linux/convert-audio-files-in-ubuntu-with-sound-converter">Convert audio files in Ubuntu with Sound Converter</a></span>]]></description>
			<content:encoded><![CDATA[<p><span>&#8220;Linux lacks good multimedia applications</span>&#8220;. <span>How many times have we heard this! This was my perception as well. Not that I do my living based on these tools but I do use them often at home. Atleast, many of us might be in a need to convert audio/video from one format to another and rip tracks out of audio cds.</span></p>
<p><span>Traditionally I use softwares like <a href="http://www.any-video-converter.com/">Any Video Converter</a>, <a href="http://www.formatoz.com/index.html">Format Factory</a> to convert audio/video files but unfortunately they are available only on Windows and I had to boot into my old Windows XP in order to use them. I thought I had no other choice and also since those tools did the job for me, I was eventually using them whenever the need arises. Fortunately there are some good tools in linux as well.</span></p>
<p><span><span id="more-46"></span><br />
</span></p>
<p><span>My search for a good audio/video converter continued and even thought of using those popular windows tools on Ubuntu using Wine after reading the article, <a href="http://mintarticles.com/read/articles_about_software/best_linux_ubuntu_videoaudio_converter_format_factory_and_wine,1024/">Best Linux Ubuntu Video/Audio Converter: Format Factory and WINE</a>.</span></p>
<p><span><br />
</span></p>
<p><span>I was almost sold if not for this <a href="http://ubuntuforums.org/showthread.php?t=766683&amp;highlight=video+converter">comprehensive guide</a> from ubuntu forums. At the first look, the article might look a bit overwhelming, but it contains a wealth of information covering many aspects. I was primarily interested in just a audio converter and I all I had to do was execute this simple command</span></p>
<p><span><code><br />
sudo apt-get install soundconverter audacity oggconvert<br />
</code><br />
All these three are audio converting tools where audacity provides audio editing capabilities as well. You might also need sound-juicer to extract audio files from cd. Installing that is pretty straightforward:<br />
<code><br />
sudo apt-get install sound-juicer<br />
</code><br />
Converting files are only two steps away. Click &#8220;Add File&#8221; button to add the files you would like to convert. Once you have added the necessary files, click &#8220;Convert&#8221;.<br />
</span><span><br />
<img style="max-width: 800px;" src="http://solitarygeek.com/blog/wp-content/uploads/2009/07/screenshot3.png" alt="" /></span></p>
<p><span><img style="max-width: 800px;" src="http://solitarygeek.com/blog/wp-content/uploads/2009/07/screenshot4.png" alt="" /></span></p>
<p><span>By default, Sound Converter converts audio files to the opensource &#8220;ogg&#8221; format. If you want the default output to be &#8220;mp3&#8243;, </span><span>you need to first install some <a href="http://soundconverter.berlios.de/gstreamer-mp3-encoding-howto/">additional libraries</a>. Then you need to edit the preferences and change the output format &#8220;mp3&#8243; (under the section &#8220;Type of result&#8221;).</span></p>
<p><span><img style="max-width: 800px;" src="http://solitarygeek.com/blog/wp-content/uploads/2009/07/screenshot2.png" alt="" /></span></p>
<p><span>I am using Sound Converter quite regularly now and I am quite impressed with it. How about you? What tools do you use to convert audio files? It will be great if you can share your experiences as well.<br />
</span></p>
]]></content:encoded>
			<wfw:commentRss>http://solitarygeek.com/linux/convert-audio-files-in-ubuntu-with-sound-converter/feed</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Extending Subversion with Apache</title>
		<link>http://solitarygeek.com/version-control/extending-subversion-with-apache</link>
		<comments>http://solitarygeek.com/version-control/extending-subversion-with-apache#comments</comments>
		<pubDate>Fri, 01 Aug 2008 05:14:37 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Subversion]]></category>
		<category><![CDATA[Version Control]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[httpd]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://jamesselvakumar.wordpress.com/2008/08/01/extending-subversion-with-apache/</guid>
		<description><![CDATA[<p>In one of my previous post, I explained about using TortoiseSVN with subversion. Continuing in the same vein, we will see how to extend subversion with the Apache web server. Apache, the most popular http server in the world provides powerful extension point to your subversion repositories and a strong understanding of how these two technologies work together is very important for those who are into it.</p> <p>Objective: - To learn how to configure Apache http server to provide remote access to subversion repositories. - To learn how to configure authorization and access control to subversion repositories through Apache http <span style="color:#777"> . . . &#8594; Read More: <a href="http://solitarygeek.com/version-control/extending-subversion-with-apache">Extending Subversion with Apache</a></span>]]></description>
			<content:encoded><![CDATA[<p>In one of my <a href="http://jamesselvakumar.wordpress.com/2008/03/14/extending-subversion-by-using-tortoisesvn/">previous post</a>, I explained about using TortoiseSVN with subversion. Continuing in the same vein, we will see how to extend subversion with the Apache web server. Apache, the most popular http server in the world provides powerful extension point to your subversion repositories and a strong understanding of how these two technologies work together is very important for those who are into it.</p>
<p><strong>Objective:<br />
</strong><br />
- To learn how to configure Apache http server to provide remote access to subversion repositories.<br />
- To learn how to configure authorization and access control to subversion repositories through Apache http server.<br />
<strong><br />
Pre-requisites:</strong></p>
<p>- <a href="http://subversion.tigris.org/">Subversion 1.4.6</a> for Apache 2.2<br />
- <a href="http://tortoisesvn.tigris.org/">TortoiseSVN</a></p>
<p><span id="more-191"></span></p>
<p><strong>Step 1: Download Apache 2.2:</strong></p>
<p>Download the latest Apache 2.2 installer from <a href="http://httpd.apache.org/download.cgi">here</a>.</p>
<p><strong>Step 2: Install Apache 2.2:</strong></p>
<p><strong></strong>Installing the Apache http server is very straightforward. Just follow the instructions in the installer gui.<br />
Let&#8217;s call the Apache installation directory as APACHE_HOME. (Normally this shall be C:\Program Files\Apache Software Foundation\Apache2.2 in windows)</p>
<p><strong>Step 3: Copy Subversion modules/dll  for Apache:</strong><br />
<strong><br />
</strong>Subversion comes with two modules that Apache can use to access the repositories.</p>
<p>1. mod_dav_svn.so    &#8211; The subversion module to provide filesystem access<br />
2. mod_authz_svn.so &#8211; The subversion module to provide fine grained access control</p>
<p>These two modules can be found in the SUBVERSION_HOME\bin directory. Copy these files to APACHE_HOME\modules directory.</p>
<p>It&#8217;s not over yet. There are two more files you need to copy to ensure that the Apache-Subversion setup works correctly.</p>
<p>1. libdb44.dll<br />
2. intl3_svn.dll</p>
<p>Where are they located? Well, in the same SUBVERSION_HOME\bin directory. Copy these files to APACHE_HOME\bin directory.<strong><br />
</strong><br />
Congrats! You have successfully setup your Apache http server. We will now look how to configure Apache to access your subversion repositories.<br />
<strong><br />
Step 4 (Optional): Create a Subversion Repository</strong></p>
<p><strong></strong>You want me to explain this again&#8230;?</p>
<p><strong>Step 5: Configure http.conf</strong> <strong>to load Subversion modules for Apache</strong></p>
<p>The http.conf file is the configuration file used by Apache. It can be found in APACHE_HOME\conf directory. We need to configure this file to instruct Apache to load the subversion modules we copied in Step 3. (Remember..?)</p>
<p>Look for the &#8220;Dynamic Shared Object (DSO) Support&#8221; section in your http.conf. You can see many &#8220;LoadModule&#8221; statements in this section. Now, uncomment the following line:</p>
<div style="background-color:lightgray;width:600px;">LoadModule dav_module modules/mod_dav.so</div>
<p>Add the following lines after adding the above mentioned line:</p>
<div style="background-color:lightgray;width:600px;">LoadModule dav_svn_module     modules/mod_dav_svn.so<br />
LoadModule authz_svn_module modules/mod_authz_svn.so</div>
<p><strong>Step 6: Configure Subversion repositories in http.conf</strong></p>
<p>Assume that you have a repository at the location &#8220;E:\Subversion\Repositories\test-repository&#8221;. You want to access this repository using the url &#8220;http://localhost/svn/test-repository&#8221;. Let us instruct Apache on how to handle this scenario.</p>
<p>Go to the end of your http.conf file and add the following lines:<br />
(Please replace the SVNPath mentioned here with that of yours. Note that we are using file separator &#8220;/&#8221; and not &#8220;\&#8221;)</p>
<div style="background-color:lightgray;width:600px;">DAV svn<br />
SVNPath E:/Subversion/Repositories/test-repository</div>
<p>After adding this, restart your Apache service for the changes to take effect.</p>
<p>This is a bare minimum configuration which should enable Apache to access to your subversion repository. Want to check this? Point your browser to the url &#8220;http://localhost/svn/test-repository&#8221; and Apache http server will be happily displaying all the files under your repository.</p>
<p><img class="alignnone" src="http://farm4.static.flickr.com/3273/2721787969_173f5ed58b_o.png" alt="" width="575" height="325" /></p>
<p><strong>Step 7: Authentication</strong></p>
<p>Now your subversion repository can be remotely accessed through Apache http server. And anyone in your network can do a subversion checkout by typing the following command in command prompt.</p>
<div style="background-color:lightgray;width:600px;">svn co http://localhost/svn/test-repository YOUR_DIRECTORY</div>
<p>(Or if you have tortoisesvn, you can right click inside any directory and do a &#8220;SVN Checkout&#8221;)</p>
<p>And people can even change the source code and &#8220;commit&#8221; the changes back to your repository. But you don&#8217;t want that to happen. You want only authenticated users to access your repository. With Apache, this can be a piece of cake for you. Apache comes with a inbuilt &#8220;htpasswd&#8221; command line utility to help you create users and passwords in a secured way. To put that into action, just follow these steps:</p>
<p>- Open command prompt and navigate to APACHE_HOME\bin directory.<br />
- Type the command,</p>
<div style="background-color:lightgray;width:600px;">htpasswd -c &#8220;APACHE_HOME\conf\users.htpasswd&#8221; james</div>
<p>Here you are instructing the &#8220;htpasswd&#8221; utility to create a new user named &#8220;james&#8221; in a password file called &#8220;users.htpasswd&#8221; in the directory &#8220;APACHE_HOME\conf&#8221;. When you enter this command, you will be prompted to enter a password for this user and to confirm it as well. Apache will use MD5 encryption standard (by default) to encrypt the password and store that in the &#8220;users.htpasswd&#8221; file mentioned by you.</p>
<p>The following screenshot explains this process.</p>
<p><img class="alignnone" src="http://farm4.static.flickr.com/3064/2721774989_dbf27844e5_o.png" alt="" width="683" height="200" /></p>
<p>To add more users you can use the following command:</p>
<div style="background-color:lightgray;width:600px;">htpasswd &#8220;APACHE_HOME\conf\users.htpasswd&#8221; gift</div>
<p>This tells the htpasswd utility to add a user named &#8220;gift&#8221; in the same &#8220;users.htpasswd&#8221; file.</p>
<p>You have to instruct Apache to refer to this file for authentication. Open your http.conf file and modify the  block you created in Step 6. Your  block should now look like this:</p>
<div style="background-color:lightgray;width:600px;">DAV svn<br />
SVNPath E:/Subversion/Repositories/test-repository<br />
AuthType Basic<br />
AuthName &#8220;Subversion test-repository&#8221;<br />
AuthUserFile conf/users.htpasswd<br />
Require valid-user</div>
<p>In the above block you are instructing Apache to use &#8220;Basic&#8221; authentication type and allow only &#8220;valid users&#8221; mentioned in the file &#8220;conf/users.htpasswd&#8221;.<br />
(NOTE: You are mentioning the relative path of the &#8220;users.htpasswd&#8221; file from your document root. Your default document root is APACHE_HOME.)</p>
<p>Want to see your settings in action? Save your http.conf file, restart your Apache service and point your browser to the url &#8220;http://localhost/svn/test-repository&#8221;. You will not be able to access your repository as you did before, you must be authenticated to proceed further. You might see some popup window like this:</p>
<p><img class="alignnone" src="http://farm4.static.flickr.com/3235/2721731711_4a8df3c9df_o.png" alt="" width="653" height="170" /></p>
<p>If you entered your credentials correctly, you can access the subversion repository through your browser. If your credentials were wrong, your browser will display a page like this:</p>
<p><img class="alignnone" src="http://farm4.static.flickr.com/3233/2721768611_7d679cc298_b.jpg" alt="" width="661" height="141" /></p>
<p><strong>Step 8: Access Control</strong></p>
<p><strong></strong>Great! You have configured your Apache http server in such a way that only &#8220;authorized users&#8221; (specified by you in the file &#8220;users.htpasswd&#8221;) can access your subversion repository. Here comes another need which requires you to specify &#8220;specific users&#8221; to access &#8220;specific parts&#8221; of your repository. For example, you want to give your users &#8220;read-write&#8221; access to the &#8220;trunk&#8221; folder but only &#8220;read&#8221; access to &#8220;tags&#8221; folder. How to achieve this..?</p>
<p>First, create a file called test-repository-authz.conf in the directory APACHE_HOME\conf. We will now define the access controls for your users. It can look something like this:</p>
<div style="background-color:lightgray;width:600px;">[/]<br />
james=r<br />
gift=r[/trunk]<br />
james=rw<br />
gift=rw</div>
<p>This says that give &#8220;read&#8221; access to the users &#8220;james&#8221; and &#8220;gift&#8221; for all parts of the repository except for the &#8220;trunk&#8221; folder where they both will have &#8220;read-write&#8221; access.</p>
<p>But how will Apache refer to this file&#8230;? We need to modify our &#8220;Location&#8221; block again this time, something like this:</p>
<div style="background-color:lightgray;width:600px;">DAV svn<br />
SVNPath E:/Subversion/Repositories/test-repository<br />
AuthType Basic<br />
AuthName &#8220;Subversion test-repository&#8221;<br />
AuthUserFile conf/users.htpasswd<br />
AuthzSVNAccessFile conf/test-repository-authz.conf<br />
Require valid-user</div>
<p>That&#8217;s it! Now you have fine grained control over who access which portion of your repository.</p>
<p><strong>Step 9 (Optional): Even more Access Control</strong></p>
<p>Having successfully setup the Apache http server to access your subversion repositories, you are planning to enjoy your coffee break with your colleagues. Suddenly your boss calls you and says &#8220;Hei, I want even tight access control mechanism based on IP Address. I don&#8217;t want anyone to access our subversion repositories from any other machines other than the one we give access. I hope you can do it.&#8221; You think &#8220;Can Apache handle this scenario..?&#8221;. Why not..? This is how you do that with few more additional lines&#8230;</p>
<div style="background-color:lightgray;width:700px;">DAV svn<br />
SVNPath E:/Subversion/Repositories/test-repositoryOrder deny,allow</p>
<p>#Deny access to all machines except for the ones listed in the &#8220;Allow&#8221; section<br />
Deny from all</p>
<p>#Allow access to the following machines.<br />
Allow from x.x.x.x<br />
Allow from y.y.y.y</p>
<p>AuthType Basic<br />
AuthName &#8220;Subversion test-repository&#8221;<br />
AuthUserFile conf/users.htpasswd<br />
AuthzSVNAccessFile conf/test-repository-authz.conf<br />
Require valid-user</p></div>
<p>(Note: Please mention the actual IP address instead of &#8220;x.x.x.x&#8221; and &#8220;y.y.y.y&#8221;)</p>
<p>We will explore what these statements mean here.</p>
<div style="background-color:lightgray;width:600px;">Order deny,allow</div>
<p>The above statement instructs Apache to process &#8220;Deny&#8221; statements before &#8220;Allow&#8221; statements.</p>
<div style="background-color:lightgray;width:600px;">Deny from all</div>
<p>The above statement instructs Apache to deny access to all machines by default.</p>
<div style="background-color:lightgray;width:600px;">Allow from x.x.x.x<br />
Allow from y.y.y.y</div>
<p>The above statement instructs Apache to allow access from the machines with the IP Address &#8220;x.x.x.x&#8221; and &#8220;y.y.y.y&#8221;.</p>
<p>Apache is such a versatile server that it provides many other options but that is outside the scope of this blog entry. Hopefully I will try to cover some of them in another post. Thank you very much for reading this post patiently. I hope this is useful to some of you.</p>
]]></content:encoded>
			<wfw:commentRss>http://solitarygeek.com/version-control/extending-subversion-with-apache/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Subversion and NetBeans &#8211; A quick start guide</title>
		<link>http://solitarygeek.com/java/subversion-and-netbeans-a-quick-start-guide</link>
		<comments>http://solitarygeek.com/java/subversion-and-netbeans-a-quick-start-guide#comments</comments>
		<pubDate>Mon, 07 Apr 2008 02:24:10 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[NetBeans]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[Version Control]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://jamesselvakumar.wordpress.com/?p=49</guid>
		<description><![CDATA[<p>Introduction:</p> <p>Subversion is arguably the most popular version control system as of now. No wonder NetBeans has very good support for Subversion. I personally feel that a java developer must be familiar with both these tools. This article shall help you to get started with both these tools.</p> <p>Objectives: </p> <p>- To create a simple java project in NetBeans.</p> <p>- To import the java project into the subversion repository.</p> <p>- To commit the changes made in a java source file.</p> <p>- To view the revision history of a java source file which was changed.</p> <p>- To rollback to the previous <span style="color:#777"> . . . &#8594; Read More: <a href="http://solitarygeek.com/java/subversion-and-netbeans-a-quick-start-guide">Subversion and NetBeans &#8211; A quick start guide</a></span>]]></description>
			<content:encoded><![CDATA[<p><strong>Introduction:</strong></p>
<p>Subversion is arguably the most popular version control system as of now. No wonder NetBeans has very good support for Subversion. I personally feel that a java developer must be familiar with both these tools. This article shall help you to get started with both these tools.</p>
<p><strong>Objectives: </strong></p>
<p>- To create a simple java project in NetBeans.</p>
<p>- To import the java project into the subversion repository.</p>
<p>- To commit the changes made in a java source file.</p>
<p>- To view the revision history of a java source file which was changed.</p>
<p>- To rollback to the previous revision of the java source file.</p>
<p><span id="more-186"></span><strong>Requirements:</strong></p>
<p>- NetBeans 6.1 Beta or NetBeans 6.0</p>
<p>- Subversion</p>
<p>- TortoiseSVN</p>
<p>- Though not mandatory, but a basic knowledge of subversion concepts.</p>
<p>Note: You can read this <a href="http://www.solitarygeek.com/version-control/extending-subversion-by-using-tortoisesvn/">article</a> to learn how to install/configure Subversion and TortoiseSVN.</p>
<p><strong> Step 1:</strong></p>
<p>Create a new &#8220;Java Application&#8221; project called &#8220;SimpleLogin&#8221;.</p>
<p><img src="http://farm3.static.flickr.com/2285/2354391015_e8070fe6c2.jpg?v=0" alt="" width="320" height="205" /></p>
<p><strong>Step 2:</strong></p>
<p>Create a new JFrame called &#8220;LoginFrame&#8221; under the package &#8220;org.example.simplelogin&#8221; and add the necessary components as shown below.</p>
<p><img src="http://farm4.static.flickr.com/3246/2355221082_2e9b59379e.jpg?v=0" alt="" width="389" height="319" /></p>
<p><strong>Step 3:</strong></p>
<p>Name the swing components accordingly.</p>
<p><img src="http://farm3.static.flickr.com/2092/2354399601_5e9845018a.jpg?v=0" alt="" width="316" height="214" /></p>
<p>Your application should like this now on preview:</p>
<p><img src="http://farm4.static.flickr.com/3224/2354366319_b5dac51760.jpg?v=0" alt="" width="368" height="236" /></p>
<p><strong> Step 4:</strong></p>
<p>Create a java class named &#8220;LoginService&#8221; under the package &#8220;org.example.simplelogin&#8221;.</p>
<p><img src="http://farm3.static.flickr.com/2370/2354421741_398aa583b0.jpg?v=0" alt="" width="209" height="127" /></p>
<p><strong>Step 5:</strong></p>
<p>Add the following code to the LoginService class.</p>
<p><img src="http://farm4.static.flickr.com/3032/2354421803_83e0994905.jpg?v=0" alt="" width="500" height="289" /></p>
<p>Here we are defining a simple method which shall return true if the username is &#8220;guest&#8221; and the password is &#8220;password&#8221;.</p>

<p><strong>Step 6:</strong></p>
<p>Now open &#8220;LoginFrame.java&#8221; and add the following methods.</p>
<p><img src="http://farm3.static.flickr.com/2285/2354439587_93693668f4.jpg?v=0" alt="" width="500" height="379" /></p>
<p>The above methods are self explanatory. We are just doing a simple validation and calling the login method we defined previously in the class LoginService.</p>
<p><strong>Step 7:</strong></p>
<p>Now double click the login &#8220;button&#8221; in the design mode of LoginFrame.java to create the event handling method named &#8220;loginButtonActionPerformed&#8221;. Add the following code to call the &#8220;performLogin&#8221; method.</p>
<p><img src="http://farm4.static.flickr.com/3248/2355269808_59b4391e3f.jpg?v=0" alt="" width="500" height="146" /></p>
<p>That&#8217;s it.</p>
<p><strong>Step 8:</strong></p>
<p>Run the project.</p>
<p>If you enter the username as &#8220;guest&#8221; and password as &#8220;password&#8221;, you will get an output like this.</p>
<p><img src="http://farm4.static.flickr.com/3230/2355196504_9173f89f63.jpg?v=0" alt="" width="392" height="241" /></p>
<p>Otherwise, you will be getting an output like this.</p>
<p><img src="http://farm3.static.flickr.com/2001/2354366847_faebc87abf.jpg?v=0" alt="" width="393" height="242" /></p>
<p>Ok, our simple login application is ready for prime time <img src='http://solitarygeek.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> . Now let us import this project into a subversion repository.</p>
<p><strong>Step 9:</strong></p>
<p>Create an empty folder called &#8220;MyRepository&#8221; in a preferred location.</p>
<p><img src="http://farm3.static.flickr.com/2158/2332675889_afaca8cb2b.jpg?v=0" alt="" width="390" height="435" /></p>
<p><strong>Step 10:</strong></p>
<p>Create a subversion repository in the empty &#8220;MyRepository&#8221; folder as mentioned below, by right clicking anywhere inside the windows explorer.</p>
<p><img src="http://farm3.static.flickr.com/2240/2333503938_c0cc41b66b.jpg?v=0" alt="" width="376" height="342" /></p>
<p>Accept the default option (FSFS)  in the &#8220;Create Repository&#8221; window.</p>
<p><img src="http://farm4.static.flickr.com/3039/2332675945_2ef1cf39a5.jpg?v=0" alt="" width="285" height="178" /></p>
<p>That&#8217;s it. Your repository should be ready when you press &#8220;OK&#8221; and it should look something like this.</p>
<p><img src="http://farm4.static.flickr.com/3136/2333503978_2f67050339.jpg?v=0" alt="" width="367" height="276" /></p>
<p><strong>Step 11:</strong></p>
<p>Let us import the NetBeans project we have created into the subversion repository. Right click the NetBeans project we have created and then click &#8220;Versioning -&gt; Import into Subversion Repository&#8221;.</p>
<p><img src="http://farm4.static.flickr.com/3227/2354370051_a1bb1babc9.jpg?v=0" alt="" width="450" height="500" /></p>
<p>NetBeans will prompt you with a window. Enter the path of your repository as shown below.</p>
<p><img src="http://farm4.static.flickr.com/3131/2354366929_c0b9e131fc.jpg?v=0" alt="" width="500" height="363" /></p>
<p>Click the &#8220;Next&#8221; button and enter the &#8220;Repository Folder&#8221; name into which you would like to import your project. To make things simple, let us enter our NetBeans project name itself as the &#8220;Repository Folder&#8221; name. Also enter a small description about this import activity as shown below.<br />
<img src="http://farm4.static.flickr.com/3190/2354367351_3b774a4fe0.jpg?v=0" alt="" width="500" height="363" /></p>
<p>We are almost there. Click the &#8220;Next&#8221; button and the IDE will show a window like this.</p>
<p><img src="http://farm3.static.flickr.com/2360/2354367443_e95904ec06.jpg?v=0" alt="" width="500" height="363" /></p>
<p>Accept the default entries and click &#8220;Finish&#8221;. Congratulations! you have imported your project successfully into the subversion repository.</p>
<p>Right click anywhere in your desktop/windows explorer and click &#8220;TortoiseSVN -&gt; Repo-Browser&#8221; and then enter the path of your subversion repository. You can see all your project files sitting comfortably inside the subversion repository. <img src='http://solitarygeek.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><img src="http://farm3.static.flickr.com/2380/2354367493_f3d0a11d7e.jpg?v=0" alt="" width="500" height="385" /></p>
<p><strong>Step 12:</strong></p>
<p>Let us play around with some more cool subversion integration features offered by NetBeans. Open the class &#8220;LoginService.java&#8221; and change the value of &#8220;DUMMY_PASSWORD&#8221; from &#8220;password&#8221; to &#8220;guest&#8221;.</p>
<p><img src="http://farm3.static.flickr.com/2279/2354367625_3451f147bb.jpg?v=0" alt="" width="488" height="132" /></p>
<p>You can see the IDE markup a blue shade near the line you made the change. This indicates that your source file has got something different than the version in the repository. You can also note that the IDE change your java source file name&#8217;s font-color to blue.</p>
<p><img src="http://farm3.static.flickr.com/2100/2355197270_23d115a77c.jpg?v=0" alt="" width="211" height="169" /></p>
<p>Let us turn our focus to the editor window again. Click the blue stripe shown by the IDE near the  place where you made changes to the source file. The IDE will popup a small hint-window.</p>
<p><img class="alignnone" src="http://farm3.static.flickr.com/2306/2355199812_f99bab7f3d.jpg?v=0" alt="screenshot" /></p>
<p>You can see the previous value of the DUMMY_PASSWORD there. The IDE also provides you a set of buttons to revert back the changes or to have a &#8220;diff&#8221; view on the changes made. Let us explore the &#8220;diff&#8217; functionality of the IDE first by clicking the &#8220;diff&#8221; button.</p>
<p><img class="alignnone" src="http://farm3.static.flickr.com/2087/2354370155_6d7e54a8b8.jpg?v=0" alt="screenshot" /></p>
<p>The IDE will display the &#8220;diff&#8221; view of the &#8220;working copy&#8221; and the &#8220;HEAD&#8221; revision (the latest committed version) in the repository.</p>
<p><img class="alignnone" src="http://farm3.static.flickr.com/2345/2355198438_3bd7fbf264.jpg?v=0" alt="screenshot" /></p>
<p>From the above figure, you can see the current and previous value of the string DUMMY_PASSWORD. Now you can revert back to the old value of &#8220;DUMMY_PASSWORD&#8221; by clicking the replace  button (displayed like an arrow)</p>
<p><img class="alignnone" src="http://farm3.static.flickr.com/2351/2354368671_662f937baa.jpg?v=0" alt="screenshot" /></p>
<p>When you press the &#8220;replace&#8221; button, the IDE will replace the &#8220;current&#8221; value with the &#8220;original&#8221; value.</p>
<p><img class="alignnone" src="http://farm3.static.flickr.com/2190/2354369007_61c4845791.jpg?v=0" alt="screenshot" /></p>
<p>The &#8220;diff&#8221; view provided by the IDE will be very useful to examine and compare the changes made to the &#8220;working copy&#8221;  alongwith the option to revert back to the original version in the repository. But if all you need is to quickly revert back some change to the original version in the repository, you can click on the blue strip in the source code and click the &#8220;revert&#8221; button.</p>
<p><img class="alignnone" src="http://farm4.static.flickr.com/3166/2354370183_f78490efc2.jpg?v=0" alt="screenshot" /></p>
<p>That&#8217;s cool, right?</p>
<p><strong>Step 13:</strong></p>
<p>Enough playing. Now let us commit the changes we made in our source file. Ensure that the source file you are willing to commit is in focus and click the menu &#8220;Versioning -&gt; Commit&#8221;</p>
<p><img class="alignnone" src="http://farm3.static.flickr.com/2172/2354369307_0be03de170.jpg?v=0" alt="screenshot" /></p>
<p>When you click the &#8220;Commit&#8221; menu item, the IDE will prompt you with a window to enter the &#8220;message&#8221; for this commit operation. Enter a commit message and click the &#8220;Commit&#8221; button.</p>
<p><img class="alignnone" src="http://farm3.static.flickr.com/2318/2355199090_2c2ae15907.jpg?v=0" alt="screenshot" /></p>
<p><strong>Step 14:</strong></p>
<p>Let us explore the history of our source file and see the the changes we made all along. Click the &#8220;Versioning -&gt; Search History&#8221; menu.</p>
<p><img class="alignnone" src="http://farm3.static.flickr.com/2069/2354369489_750d96fbe5.jpg?v=0" alt="screenshot" /></p>
<p>The IDE will display all the versions of the source file.</p>
<p><img class="alignnone" src="http://farm4.static.flickr.com/3114/2355199460_9c845473d6.jpg?v=0" alt="screenshot" /></p>
<p>In the &#8220;Search History&#8221; window, the IDE offers two views, &#8220;summary&#8221; view and &#8220;diff&#8221; view. By default, the IDE displays the &#8220;summary&#8221; view. The &#8220;diff&#8221; view contains more information.</p>
<p><img class="alignnone" src="http://farm4.static.flickr.com/3179/2354369639_4956351bea.jpg?v=0" alt="screenshot" /></p>
<p>You can straightaway &#8220;revert&#8221; or &#8220;rollback&#8221; to previous revisions just by right clicking a particular revision.</p>
<p><img class="alignnone" src="http://farm4.static.flickr.com/3274/2354370017_5f7832e150.jpg?v=0" alt="screenshot" /></p>
<p>Nice, isn&#8217;t it? There are still a lot more cool subversion features offered by NetBeans. I will blog more about that later. I hope the information provided here was useful to you.</p>
<p>Read also: &#8220;<a href="http://solitarygeek.com/java/netbeans-and-maven-a-quick-start-guide">NetBeans and Maven &#8211; A quick start guide</a>&#8221;</p>
<p><strong>SolitaryGeek Poll</strong></p>
Note: There is a poll embedded within this post, please visit the site to participate in this post's poll.
]]></content:encoded>
			<wfw:commentRss>http://solitarygeek.com/java/subversion-and-netbeans-a-quick-start-guide/feed</wfw:commentRss>
		<slash:comments>32</slash:comments>
		</item>
		<item>
		<title>Extending Subversion by using TortoiseSVN</title>
		<link>http://solitarygeek.com/version-control/extending-subversion-by-using-tortoisesvn</link>
		<comments>http://solitarygeek.com/version-control/extending-subversion-by-using-tortoisesvn#comments</comments>
		<pubDate>Fri, 14 Mar 2008 09:56:22 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Subversion]]></category>
		<category><![CDATA[Version Control]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[tortoisesvn]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://jamesselvakumar.wordpress.com/?p=45</guid>
		<description><![CDATA[<p>Though Subversion is a powerful version control system, it&#8217;s command-line based interface may not appeal to some users who used other version control systems like Visual Source Safe. And what if you want to remotely access your repository as well?</p> <p>TortoiseSVN and Apache comes to your aid. TortoiseSVN is a powerful tool for Subversion, which helps you to issue most of the subversion commands from your windows explorer. Subversion has an inbuilt &#8220;svnserve&#8221; utility which helps you to expose your repository to remote users, but it&#8217;s highly recommended to use the flexible Apache Web Server for this purpose. Subversion comes <span style="color:#777"> . . . &#8594; Read More: <a href="http://solitarygeek.com/version-control/extending-subversion-by-using-tortoisesvn">Extending Subversion by using TortoiseSVN</a></span>]]></description>
			<content:encoded><![CDATA[<p>Though <a href="http://subversion.tigris.org/">Subversion</a> is a powerful version control system, it&#8217;s command-line based interface may not appeal to some users who used other version control systems like Visual Source Safe. And what if you want to remotely access your repository as well?</p>
<p><a href="http://tortoisesvn.tigris.org/">TortoiseSVN</a> and <a href="http://httpd.apache.org/">Apache</a> comes to your aid. TortoiseSVN is a powerful tool for Subversion, which helps you to issue most of the subversion commands from your windows explorer. Subversion has an inbuilt &#8220;svnserve&#8221; utility which helps you to expose your repository to remote users, but it&#8217;s highly recommended to use the flexible Apache Web Server for this purpose. Subversion comes with it&#8217;s own apache modules to expose your repository to remote users. However, in this article we will not focus on Apache. I&#8217;m planning to write about the apache integration in my next post. Please be patient <img src='http://solitarygeek.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><strong>Objective:</strong></p>
<p>In this article you will learn how to install Subversion and TortoiseSVN and use them to create a repository, import files into the repository and view the repository.</p>
<p><span id="more-182"></span><strong>Step 1: Install Subversion</strong></p>
<p>Download <a href="http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=8100&amp;expandFolder=8100&amp;folderID=8100">subversion windows installer</a> for Apache 2.2.x. (Download the file called &#8220;svn-x.y.z-setup.exe&#8221; and run the installer. Installing should be a straight forward option.</p>
<p>You might see the following windows. They are self explanatory.</p>
<p><img src="http://farm3.static.flickr.com/2015/2332581729_722229490c.jpg?v=0" alt="subversion-1" width="500" height="390" /></p>
<p><img src="http://farm3.static.flickr.com/2194/2332581779_89f2489ba9.jpg?v=0" alt="" width="500" height="389" /></p>
<p><img src="http://farm4.static.flickr.com/3157/2333409118_3e44bf4620.jpg?v=0" alt="" width="500" height="390" /></p>
<p><img src="http://farm4.static.flickr.com/3031/2332581753_bb6aa20a34.jpg?v=0" alt="" width="500" height="390" /></p>
<p><img src="http://farm4.static.flickr.com/3087/2333409144_39020eda8b.jpg?v=0" alt="" width="500" height="391" /></p>
<p><img src="http://farm4.static.flickr.com/3062/2332581683_75f1cdabe2.jpg?v=0" alt="" /></p>
<p>Now you should have subversion successfully installed in your machine. To verify that, open the command prompt and type &#8220;svn &#8211;version&#8221;. If you see something like below, pat your head, you have successfully installed subversion.</p>
<p><img src="http://farm3.static.flickr.com/2103/2333443034_ca6f6b02f7.jpg?v=0" alt="" width="500" height="253" /></p>
<p>If you couldn&#8217;t see the above mentioned message, you might want to check your &#8220;Path&#8221; environment variable and add your subversion installation directory to the &#8220;Path&#8221;.</p>
<p><strong> Step 2: Install TortoisSVN</strong></p>
<p>Download TortoiseSVN from <a href="http://tortoisesvn.net/downloads">here.<img src="http://farm3.static.flickr.com/2329/2332648723_37092443ac.jpg?v=0" alt="" /></a></p>
<p><img src="http://farm3.static.flickr.com/2308/2332648747_5e44fd2c99.jpg?v=0" alt="" /></p>
<p><img src="http://farm4.static.flickr.com/3079/2332648767_7e4533a861.jpg?v=0" alt="" /></p>
<p><img src="http://farm4.static.flickr.com/3034/2332648795_7f266f1ba9.jpg?v=0" alt="" width="499" height="392" /></p>
<p>That&#8217;s it. Now the installer setup might prompt you to restart your system to complete the installation process. Accept it.</p>
<p><strong>Step 3: Create a Subversion Repository</strong></p>
<p>Now, it&#8217;s time to create a subversion repository. Though it&#8217;s possible to use the subversion&#8217;s &#8220;svnadmin&#8221; command to create the repository, we will use TortoiseSVN to achieve that.</p>
<p><em>3a)</em> First, choose a appropriate location to keep all your repositories. In my case it&#8217;s &#8220;F:\Subversion&#8221;. Let us call this folder as REPOSITORY_ROOT. Now, let us create an empty directory called  &#8220;MyRepository&#8221; inside REPOSITORY_ROOT. It should look something like this:</p>
<p><img src="http://farm3.static.flickr.com/2158/2332675889_afaca8cb2b.jpg?v=0" alt="" width="390" height="435" /></p>
<p><em>3b) </em>Now, right click inside the  folder REPOSITORY_ROOT\MyRepository, and click &#8220;TortoiseSVN -&gt; Create repository here&#8221; menu.</p>
<p><img src="http://farm3.static.flickr.com/2240/2333503938_c0cc41b66b.jpg?v=0" alt="" width="376" height="342" /></p>
<p><em> 3c) </em>TortoisSVN will now prompt you with a message box like this:</p>
<p><img src="http://farm4.static.flickr.com/3039/2332675945_2ef1cf39a5.jpg?v=0" alt="" width="285" height="178" /></p>
<p>Leave the default option (Native file system), and click &#8220;OK&#8221;.  You can see a bunch of files inside the &#8220;MyRepository&#8221; folder like this:</p>
<p><img src="http://farm4.static.flickr.com/3136/2333503978_2f67050339.jpg?v=0" alt="" width="367" height="276" /></p>
<p>Great!! This is your subversion repository.</p>
<p><strong>Step 4: Import files into your subversion repository</strong></p>
<p><em>4a)</em> Let us add some files inside our newly created subversion repository. Right click a folder of your choice and click &#8220;TortoiseSVN -&gt; Import&#8221;</p>
<p><img src="http://farm3.static.flickr.com/2196/2333543634_3a70408d79.jpg?v=0" alt="" width="468" height="287" /></p>
<p><em> 4b)</em> Enter the appropriate repository path where you would like to import these files into. In my case it&#8217;s &#8220;file:///f:/subversion/myrepository/photos&#8221;.</p>
<p><img src="http://farm3.static.flickr.com/2286/2333543664_678e9ef0b7.jpg?v=0" alt="" width="458" height="343" /></p>
<p><em>4C)</em> When you press &#8220;OK&#8221;, TortoiseSVN will import all the files/folders inside the folder which you selected for the import operation into the subversion  repository.</p>
<p><img src="http://farm4.static.flickr.com/3140/2332714865_7a3bbed878.jpg?v=0" alt="" width="500" height="273" /></p>
<p><em>4D)</em> Press &#8220;OK&#8221;. Now we have finished importing the files into our new subversion repostiory. It&#8217;s now time to view the content of our repository.</p>
<p><strong> Step 5: Viewing the content of your subversion repository</strong></p>
<p><em>5a)</em> TortoiseSVN provides a nice &#8220;Repository Browser&#8221; option to view the content of your subversion repository. Right anywhere in your explorer window/desktop and click &#8220;TortoiseSVN -&gt; Repo-browser&#8221;.</p>
<p><img src="http://farm4.static.flickr.com/3036/2332741151_2f1480667a.jpg?v=0" alt="" width="392" height="356" /></p>
<p><em>5B)</em> Enter the url of your subversion repository. In my case, it&#8217;s &#8220;file:///f:/subversion/myrepository&#8221; and click &#8220;OK&#8221;.</p>
<p><img src="http://farm4.static.flickr.com/3064/2332741171_72e3734e8c.jpg?v=0" alt="" width="357" height="118" /></p>
<p><em> 5C)</em> That&#8217;s it, now TortoiseSVN will list down all the files inside your repository.</p>
<p><img src="http://farm3.static.flickr.com/2028/2332741223_afcd4bbab3.jpg?v=0" alt="" width="500" height="386" /></p>
<p><strong>Summary</strong>:</p>
<p>In this article, you learned to:</p>
<p>- install Subversion</p>
<p>- install TortoiseSVN</p>
<p>- create a new repository using TortoiseSVN</p>
<p>- import files into the subversion repository using TortoiseSVN</p>
<p>- view the content of the subversion repository using TortoiseSVN</p>
<p><strong>What next?</strong></p>
<p>I initially thought of even writing about installing, configuring apache/websvn in this article itself. But it already took me nearly 3 hours to finish writing this. So please bear with me. I&#8217;ll come with a Part II of this article where you will learn how to use apache/websvn along with subversion to make the interaction with your version control system a pleasure. See you again.</p>
<p><em>Added on August 2, 2008:</em></p>
<p>I have written an article named &#8220;<a href="http://jamesselvakumar.wordpress.com/2008/08/01/extending-subversion-with-apache/">Extending Subversion with Apache</a>&#8220;. This article is about setting up Apache http server and configuring it to access subversion repositories. It also deals how to setup Authentication and Access control for your subversion repositories using Apache. Hope you find it useful.</p>
<p><strong>SolitaryGeek Poll</strong></p>
Note: There is a poll embedded within this post, please visit the site to participate in this post's poll.
]]></content:encoded>
			<wfw:commentRss>http://solitarygeek.com/version-control/extending-subversion-by-using-tortoisesvn/feed</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
	</channel>
</rss>

