<?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>www.unnionline.com &#187; Subversion</title>
	<atom:link href="http://www.unnionline.com/blog/category/subversion/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.unnionline.com/blog</link>
	<description></description>
	<lastBuildDate>Wed, 30 Nov 2011 11:49:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
		<item>
		<title>A Fast And Non-resource Hungry Backup Stategy For Ubuntu</title>
		<link>http://www.unnionline.com/blog/2011/04/a-fast-and-non-resource-hungry-backup-stategy-for-ubuntu/</link>
		<comments>http://www.unnionline.com/blog/2011/04/a-fast-and-non-resource-hungry-backup-stategy-for-ubuntu/#comments</comments>
		<pubDate>Mon, 18 Apr 2011 15:56:51 +0000</pubDate>
		<dc:creator>cbaunni</dc:creator>
				<category><![CDATA[Administration]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[Photography]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Adobe Lightroom]]></category>
		<category><![CDATA[Adobe Photoshop]]></category>
		<category><![CDATA[Backing up photographs]]></category>
		<category><![CDATA[cron]]></category>
		<category><![CDATA[cron and rsync]]></category>
		<category><![CDATA[DNG]]></category>
		<category><![CDATA[luckyBackup]]></category>
		<category><![CDATA[Photography Workflow]]></category>
		<category><![CDATA[RAW]]></category>
		<category><![CDATA[rsync]]></category>
		<category><![CDATA[VirtualBox]]></category>

		<guid isPermaLink="false">http://www.unnionline.com/blog/?p=236</guid>
		<description><![CDATA[I love command line, and]]></description>
			<content:encoded><![CDATA[<p>I love command line, and I spend most of the day working with a black-and-white terminal.  For this reason, ever since I started with Ubuntu, I have been using rsync and cron for backing up my files (in one of my previous <a href="http://www.unnionline.com/blog/category/subversion/backup/">posts</a>, I have provided a detailed how-to on backing up subversion repositories using rsync). However, not so long ago, I came across a very useful GUI for rsync and cron based backup called &#8216;luckyBackup&#8217;. I liked this software as it allowed me to visualise all my backup cron jobs in a single window. For some reason the experience of using this tool was a bit more reassuring than what I used to do. Some of its features such as multiple profiles, exclude/include files/directories, synchronisation etc were found to be very handy.</p>
<p>Now that I have started working with RAW and DNG photographs, my <a href="http://www.unnionline.com/blog/2011/04/nondestructive-photography-workflow-that-i-follow/">workflow</a> demands an efficient backup solution. I work on these files using Adobe Lighroom and Photoshop (I prefer them more than Gimp) on a VirtualBox WindowsXP. I have configured luckyBackup on my server to make backup of my RAW files every 12 hours to two independent locations &#8211; an internal backup only hard drive and a portable hard drive. luckyBackup emails me when the target directories are 25GB in size, so that I can then write it on to a Blue-Ray disk and lock it up safely. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.unnionline.com/blog/2011/04/a-fast-and-non-resource-hungry-backup-stategy-for-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Merging a Subversion Branch With Trunk</title>
		<link>http://www.unnionline.com/blog/2011/01/merging-a-subversion-branch-with-trunk/</link>
		<comments>http://www.unnionline.com/blog/2011/01/merging-a-subversion-branch-with-trunk/#comments</comments>
		<pubDate>Mon, 24 Jan 2011 15:36:33 +0000</pubDate>
		<dc:creator>cbaunni</dc:creator>
				<category><![CDATA[Subversion]]></category>
		<category><![CDATA[Version control]]></category>
		<category><![CDATA[version control]]></category>

		<guid isPermaLink="false">http://www.unnionline.com/blog/?p=191</guid>
		<description><![CDATA[A most confusing thing to]]></description>
			<content:encoded><![CDATA[<p>A most confusing thing to do in subversion is to merge a branch with a trunk. One might need this in cases where the branch has grown and has to be made a trunk. Following is a step by step how-to on doing this the proper way.</p>
<p>1. Check out the trunk or update an earlier working copy of the trunk</p>
<pre><code>svn co file:///repository/project/trunk project</code></pre>
<p>2. Merge the branch with the working copy</p>
<pre><code> svn co file:///repository/project/trunk </code><code>file:///repository/project/branches/branch project </code></pre>
<p>The arguments are -<br />
a) An initial repository tree (left side of comparison)<br />
b) A final repository tree (right side of comparison)<br />
c) A working copy to accept the differences as local changes</p>
<p>This means that you can also give version numbers, for example:</p>
<pre><code>svn co file:///repository/project/trunk@100 file:///repository/project/branches/branch@114 project</code></pre>
<p>3. Now that the merging is done, go into the working copy and commit the changes.</p>
<pre><code>svn commit -m "merged branch@114 to trunk@100"</code></pre>
<p>Merging is very important and of frequent use during version control.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.unnionline.com/blog/2011/01/merging-a-subversion-branch-with-trunk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Removing .svn Directories From Subversion Checkouts</title>
		<link>http://www.unnionline.com/blog/2011/01/removing-svn-directories-from-subversion-checkouts/</link>
		<comments>http://www.unnionline.com/blog/2011/01/removing-svn-directories-from-subversion-checkouts/#comments</comments>
		<pubDate>Tue, 04 Jan 2011 11:00:39 +0000</pubDate>
		<dc:creator>cbaunni</dc:creator>
				<category><![CDATA[Subversion]]></category>
		<category><![CDATA[SVN]]></category>

		<guid isPermaLink="false">http://www.unnionline.com/blog/?p=178</guid>
		<description><![CDATA[Use the following command to]]></description>
			<content:encoded><![CDATA[<p>Use the following command to remove .svn directories from unwanted subversion checkouts.</p>
<p>find  -iname “.svn” | xargs rm -r $1</p>
<p>Alternatively, you can commit all recent changes and use svn export to get the current version without .svn directories.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.unnionline.com/blog/2011/01/removing-svn-directories-from-subversion-checkouts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Backup Subversion Repositories And Projects</title>
		<link>http://www.unnionline.com/blog/2009/05/backup-subversion-repositories-and-projects/</link>
		<comments>http://www.unnionline.com/blog/2009/05/backup-subversion-repositories-and-projects/#comments</comments>
		<pubDate>Tue, 12 May 2009 15:51:08 +0000</pubDate>
		<dc:creator>cbaunni</dc:creator>
				<category><![CDATA[Backup]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[cron jobm rsync]]></category>
		<category><![CDATA[Crontab]]></category>
		<category><![CDATA[hot-backup.py]]></category>
		<category><![CDATA[Repositories]]></category>
		<category><![CDATA[subversion backup]]></category>
		<category><![CDATA[subversion server]]></category>
		<category><![CDATA[svn backup]]></category>
		<category><![CDATA[svn hotcopy]]></category>
		<category><![CDATA[svnadmin]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.unnionline.com/blog/?p=97</guid>
		<description><![CDATA[After I decided to manage]]></description>
			<content:encoded><![CDATA[<p>After I decided to manage my PhD thesis and projects with subversion, the most important thing to consider was a proper backup strategy. I decided to go a bit overboard with it as it might save me some day. There are several ways to backup subversion and I decided to use all of them!</p>
<p><strong>a. Using crontab and rsync to backup subversion</strong></p>
<p>Read my earlier post on crontab if you are not familiar with it. Someday I will write about rsync as well. But for now read  <a href="http://www.samba.org/rsync/">this</a> if you are new to rsync. I use the following code to backup the entire subversion repository to my backup directory.</p>
<p><code>rsync -av --delete --progress /source_directory/subversion/ /destination_directory/backups/subversion_backup/</code></p>
<p>I used crontab to schedule the above job to run at midnight every day. In case something happens to the original subeversion repository, it is easy to retrieve data from this backup &#8211; just copy it to the original location!</p>
<p><strong>b. Using the backup script from COLLABNET (the subversion guys)</strong></p>
<p>The next technique it to use the python based backup script from subversion called hot-backup.py. This script can be used to make a backup of the latest version of the subversion repository. I used the following code to download the latest version from COLLABNET website and install it on my system.</p>
<p><code>wget http://svn.collab.net/repos/svn/trunk/tools/backup/hot-backup.py.in<br />
mv hot-backup.py.in hot-backup.py</code></p>
<p>Once that is done, I had to make some configuration changes in the file. The following lines were changed</p>
<p><code># Path to svnlook utility<br />
svnlook = r"@SVN_BINDIR@/svnlook"<br />
# Path to svnadmin utility<br />
svnadmin = r"@SVN_BINDIR@/svnadmin"</code></p>
<p>to look like this</p>
<p><code># Path to svnlook utility<br />
svnlook = r"/usr/bin/svnlook"<br />
# Path to svnadmin utility<br />
svnadmin = r"/usr/bin/svnadmin"</code></p>
<p>The next step is to run the script check if everything is fine. I used the code below:</p>
<p><code>python hot-backup.py --archive-type=zip --num-backups=10 ~/source_directory/subversion_repository /destination_directory/subversion_backup/</code></p>
<p>The above code will make a hotcopy of the latest version of the subversion repository into the backup directory in zip format. A total of 10 backups will be maintained at a time, oldest one being deleted when new ones are added.</p>
<p>Once the backup was properly inspected I created a cron job to run this command at midnight every day.</p>
<p><strong>c. Using the subversion &#8216;hotcopy&#8217; command</strong></p>
<p>This is a very simple technique as it uses the inbuilt &#8216;hotcopy&#8217; command to backup the svn repository. Follow the command below to make a reliable incremental backup of your svn repositories. </p>
<p><code>svnadmin hotcopy /source_directory/subversion_repository /destination_directory/subversion_backup/</code></p>
<p>Create a cron job to schedule it.</p>
<p>Once you have your backup system in place, rest assured that your data are safe.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.unnionline.com/blog/2009/05/backup-subversion-repositories-and-projects/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Installing Subversion With Apache and DAV In Ubuntu 8.10</title>
		<link>http://www.unnionline.com/blog/2009/05/installing-subversion-with-apache-and-dav-in-ubuntu-810/</link>
		<comments>http://www.unnionline.com/blog/2009/05/installing-subversion-with-apache-and-dav-in-ubuntu-810/#comments</comments>
		<pubDate>Tue, 05 May 2009 09:04:06 +0000</pubDate>
		<dc:creator>cbaunni</dc:creator>
				<category><![CDATA[Installation]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[CVS]]></category>
		<category><![CDATA[DAV]]></category>
		<category><![CDATA[Project]]></category>
		<category><![CDATA[Repositories]]></category>
		<category><![CDATA[SVN]]></category>
		<category><![CDATA[SVN Server]]></category>
		<category><![CDATA[Ubuntu 8.10]]></category>
		<category><![CDATA[WebDAV]]></category>

		<guid isPermaLink="false">http://www.unnionline.com/blog/?p=69</guid>
		<description><![CDATA[Installing and configuring subversion (SVN) and WebDAV on ubuntu 8.10 server]]></description>
			<content:encoded><![CDATA[<p>Subversion (SVN) is a version control system initiated in 2000 by CollabNet Inc. It is used to maintain current and historical versions of files such as source code, web pages, and documentation. Its goal is to be a mostly-compatible successor to the widely used Concurrent Versions System (CVS) [<a href="http://en.wikipedia.org/wiki/Subversion_(software)">Wikipedia</a>]</p>
<p>I have adopted subversion to manage my PhD thesis and other research related tasks. Here is how I setup SVN server on my Ubuntu 8.10 server.</p>
<p><strong>Installing subversion</strong></p>
<p>First of all, we need to install the necessary packages to put SVN on to the server</p>
<p><code>sudo apt-get install subversion libapache2-svn</code></p>
<p>Now that SVN in on the server, the next step is to create a user who has rights to manage SVN repositories.</p>
<p><strong>SVN users and groups</strong></p>
<p>There are severel ways to set permissions on the repository. As I already have a username, say &#8216;mark&#8217;, on my server, the best thing to do would be to create a group called &#8216;subversion&#8217; and add myself to it. I am also planning to access my repositories via http, so it is necessary to add the user &#8216;www-data&#8217; to the &#8216;subversion&#8217; group. All this can be done by following the commands below.</p>
<p><code>sudo addgroup subversion<br />
sudo adduser mark subversion<br />
sudo adduser www-data subversion<br />
</code></p>
<p>Logout and login again before continuing further.</p>
<p><strong>Creating a SVN repository</strong></p>
<p>The next thing to do is to chose a location for creating SVN repositories. I like to create my repositories at <code>/home/svn</code>. Follow the commands below to create a SVN repository.</p>
<p><code>sudo mkdir /home/svn<br />
sudo mkdir /home/svn/research<br />
sudo svnadmin create /home/svn/research<br />
</code></p>
<p>This will create the repository &#8216;research&#8217; under /home/svn. Note that this repository will/should have the root:root user and group permissions.</p>
<p><strong>Configuring SVN access via WebDAV protocol (http://)</strong></p>
<p>To access the SVN repository via WebDAV protocol, configure the Apache2 web server. To do this edit the <code>/etc/apache2/mods-available/dav_svn.conf</code> file to look like:</p>
<p><code>DAV svn<br />
SVNPath /home/svn/research<br />
AuthType Basic<br />
AuthName "Subversion Repository"<br />
AuthUserFile /etc/svn/htaccess</code></p>
<p>Require valid-user<br />
Now WebDAV has to be provided with the user access details as it is going to control the reading and writing to the repository:</p>
<p><code>cd /etc/svn<br />
sudo htpasswd -c -m htpasswd mark<br />
</code></p>
<p>Any additional users has to be added without the &#8216;-c&#8217; switch so as to avoid overwriting the &#8216;htaccess&#8217; file. Afterword restart apache by issuing:</p>
<p><code>sudo /etc/init.d/apache2 restart<br />
</code></p>
<p>Test the configuration by typing <code>http://localhost/svn</code> in a browser. Enter the username and password and now the repository can be seen.</p>
<p><strong>Creating further repositories and projects </strong></p>
<p>Further repositories may be constructed inside the research repository, provided users of the &#8216;subversion&#8217; group should have their ownership. The following commands can achieve the same.</p>
<p><code>sudo mkdir /home/svn/research/thesis<br />
sudo chown -R mark:subversion /home/svn/research/thesis<br />
sudo chmod -R 777 /home/svn/research/thesis<br />
svnadmin create /home/svn/research/thesis<br />
</code></p>
<div id="attachment_73" class="wp-caption alignleft" style="width: 191px"><a href="http://www.unnionline.com/blog/wp-content/uploads/2009/05/svn_repository.jpg"><img class="size-medium wp-image-73" title="SVN repository structure" src="http://www.unnionline.com/blog/wp-content/uploads/2009/05/svn_repository-181x300.jpg" alt="A sample SVN repository structure" width="181" height="300" /></a><p class="wp-caption-text">A sample SVN repository structure</p></div>
<p>Once that is done, its  time create a project and add it to the repository so that SVN can manage it. Before that, its better to have a look at the &#8216;usual&#8217; subversion project directory structure [Refer figure]. In SVN, a project directory usually has 3 subdirectories; trunk, tags and branches. Trunk contain the most recent working copy of the project, tags contain copies of the working directory of some importance (such as the copy of the thesis version that was submitted to your supervisor to have a look at) and branches contain snapshots of the working copy from which you decided to follow a different route.</p>
<p>All said, the final decision about the directory structure rests upon the user. Now the idea is to create a skeletal directory structure somewhere in your home directory and import it to the thesis repository. Follow the commands below to establish this.</p>
<p><code>cd ~<br />
mkdir thesis<br />
mkdir thesis/trunk<br />
mkdir thesis/tag<br />
mkdir thesis/branches<br />
svn import thesis/ http://localhost/svn/research/thesis/<br />
</code></p>
<p>Now check repository again via the browser and project can be seen added inside. The skeletal directories can be deleted now. A working copy of the project can be created by issuing the commands:</p>
<p><code>cd ~<br />
svn checkout http://localhost/svn/research/thesis<br />
</code></p>
<p>Files can be added to the repository by:</p>
<p><code>cd ~</code><code> cd thesis/trunk/</code></p>
<p><code>touch File_A.py<br />
svn add File_A.py<br />
svn commit -m "Initial import of the File_A.py file for versioning"<br />
</code></p>
<p>Check again via the browser to see the file.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.unnionline.com/blog/2009/05/installing-subversion-with-apache-and-dav-in-ubuntu-810/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

