<?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>Daniel Hall&#039;s Website &#187; Subversion</title>
	<atom:link href="http://www.danielhall.me/tag/subversion/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.danielhall.me</link>
	<description>Because the Internet doesn&#039;t have enough opinions already</description>
	<lastBuildDate>Sun, 23 Oct 2011 23:15:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>		<item>
		<title>Using Subversion for Assignments</title>
		<link>http://www.danielhall.me/2009/10/using-subversion-for-assignments/</link>
		<comments>http://www.danielhall.me/2009/10/using-subversion-for-assignments/#comments</comments>
		<pubDate>Tue, 06 Oct 2009 11:50:28 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[School Work]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[SVN]]></category>
		<category><![CDATA[Version Control]]></category>

		<guid isPermaLink="false">http://www.danielhall.me/?p=359</guid>
		<description><![CDATA[If you&#8217;ve never heard of subversion before then you are in for a pleasant surprise. Subversion is a version control tool, which means it will keep track of several files and all their old versions. Normally subversion is used to &#8230;<p class="read-more"><a href="http://www.danielhall.me/2009/10/using-subversion-for-assignments/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve never heard of subversion before then you are in for a pleasant surprise. Subversion is a version control tool, which means it will keep track of several files and all their old versions. Normally subversion is used to help multiple people work together on a single project. It tracks all their changes and combines them all, even flagging when conflicts occur and assists in resolving them. It is also useful when working alone on a school assignment. Here&#8217;s a few dot points that capture the essence of why Subversion is useful with assignments:</p>
<ul>
<li>Subversion allows you to work on the same assignment on multiple computers.</li>
<li>Subversion can email you with changes you&#8217;ve made, allowing to review them.</li>
<li>Subversion allows you to show a teacher that you&#8217;ve been working on an assignment over the whole time available and not just in the last few days. this gives you greater leverage when asking for an extension.</li>
<li>Subversion can help you prove in a disciplinary hearing that you did not plagiarise any code from others showing the natural growth your code had.</li>
<li>Subversion can get back that file you just accidentally emptied out of the trash.</li>
<li>Subversion can show you all the changes you made between the time you fixed that annoying bug, and now, when you just reintroduced it.</li>
</ul>
<p>The first step to making an assignment in is to build your repository. If you didn&#8217;t do this first that&#8217;s okay, you can easily import an existing project into a subversion repository. To create a repository you simply use the &#8216;svnadmin create&#8217; command. You should then create some folders that should be in every subversion repository (trunk, tags and branches). This next block of commands will show you how to create the initial project. If you&#8217;re using these instructions to import an existing project just copy your files into the trunk folder before you run the &#8216;svn import&#8217; command.<br />
[code lang="shell"]mkdir -p /home/daniel/svn/newproject<br />
svnadmin create /home/daniel/svn/newproject<br />
mkdir -p /tmp/newrepo/{trunk,branches,tags}<br />
svn import /tmp/newrepo file:///home/daniel/svn/newproject -m &quot;Create Initial Structure&quot;<br />
rm -rf /tmp/newproject[/code]<br />
The trunk, tags and branches folders aren&#8217;t strictly required but can be very useful in certain circumstances. The trunk folder is where you main copy sits, it should be the latest stable version of the software. In an assignment though this is where you will probably be doing all your work, you generally don&#8217;t have the need or the time to make and merge branches. Which leads us to branches. Generally you branch software when you are about to make a major change that may break other developers work. You most likely don&#8217;t have other developers on your assignment and if you do you&#8217;ve probably all decided on what parts you will work on. Finally tags are for labelling certain versions with a specific tag. For example if you have to submit your assignment weekly you could tag each week as you submit, or you could tag as you finish each requirement. To populate these folders you just copy whatever it is you want into them. Subversion will only use a minuscule amount of space as the copy will be stored internally to the repository.</p>
<p>Before you can edit the files in the repository you need to check it out. You can check it out to the same machine, you can <a href="http://www.danielhall.me/2009/09/using-subversion-over-ssh/">use SSH</a> or you could check it out over WebDAV depending how you&#8217;ve set it up. The following command checks out the trunk folder into a folder called newproject. This is one of the few times you have to type the full path to the repository. Subversion remembers this for you so that next time you use a subversion command its pre filled.<br />
[code lang="shell"]svn checkout file:///home/daniel/svn/newproject/trunk newproject[/code]<br />
What you&#8217;ve just checked out is called a &#8216;working copy&#8217;. This is where you make your changes before uploading them again in to the repository. Your working copy also includes copies of the versions you originally checked out so that if you want to revert back to them you can. Because they are stored in the working copy you don&#8217;t need access to the repository to revert. To revert back to the version you checked out from the repository you simply run &#8216;svn revert &lt;filename&gt;&#8217;. You can also find the differences between these versions and the current ones by using &#8216;svn diff &lt;filename&gt;&#8217;. The filename is optional and if omitted will print all the changes in the current directories and below.</p>
<p>Part 2 to come&#8230;<br />
<strong>Random Thought:</strong> I&#8217;ve just redesigned my website, I&#8217;d love to know what my readers think. If you could post your comment on the new design, I&#8217;d appreciate it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danielhall.me/2009/10/using-subversion-for-assignments/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Using Subversion over SSH</title>
		<link>http://www.danielhall.me/2009/09/using-subversion-over-ssh/</link>
		<comments>http://www.danielhall.me/2009/09/using-subversion-over-ssh/#comments</comments>
		<pubDate>Wed, 23 Sep 2009 08:19:38 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[HOWTO]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[SVN]]></category>
		<category><![CDATA[Version Control]]></category>

		<guid isPermaLink="false">http://www.danielhall.me/?p=356</guid>
		<description><![CDATA[Few people don't realise that subversion has the ability to connect to a remote repository via SSH. Its extremely simple and can give you all the advantages of storing your important files on a server while still having them readily accessible on your desktop.<p class="read-more"><a href="http://www.danielhall.me/2009/09/using-subversion-over-ssh/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>Subversion is an amazing tool that you can use to keep track of all the changes you make to a group of files. If you haven&#8217;t used it before, or have never heard of &#8216;version control&#8217; then you should probably read the <a href="http://svnbook.red-bean.com/">Subversion Book</a>.</p>
<p>Few people don&#8217;t realise that subversion has the ability to connect to a remote repository via SSH. Its extremely simple and can give you all the advantages of storing your important files on a server while still having them readily accessible on your desktop. This means that for example you could have your files (and every old version of your files) stored on a RAID device on a server while working with them locally on your desktop.</p>
<p>To set this up its actually rather simple. First you create your repository and perform the initial import of the files. I usually make it in my home directory as follows:<br />
[code lang="shell"]mkdir -p /home/daniel/svn/newproject<br />
svnadmin create /home/daniel/svn/newproject<br />
mkdir -p /tmp/newrepo/{trunk,branches,tags}<br />
svn import /tmp/newrepo file:///home/daniel/svn/newproject -m &quot;Create Initial Structure&quot;<br />
rm -rf /tmp/newproject[/code]<br />
These commands are basically what you&#8217;d use to create any subversion repository and people familiar with it require no explanation. Most people probably even have is scripted to make it just that much easier. Here comes the fun part though. Next we (on our local machine) check the files out. To checkout subversion repositories over ssh you simply use the following command:<br />
[code lang="shell"]svn checkout svn+ssh://username@servername/home/daniel/svn/newproject/trunk newproject[/code]<br />
All going well you will now see a password prompt and upon successful authentication the files will be checked out. This is all that is required and from now on you can simply use the ordinary svn commands.</p>
<p><strong>Random Thought:</strong> &#8230; and I says to the kernel developer, I says &#8220;git this!&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danielhall.me/2009/09/using-subversion-over-ssh/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

