<?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>The Troll-Range &#187; svn</title>
	<atom:link href="http://blog.trollgod.org.uk/tag/svn/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.trollgod.org.uk</link>
	<description>Ghworg&#039;s wibblings and geek projects.</description>
	<lastBuildDate>Sat, 12 Nov 2011 10:10:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>		<item>
		<title>Moving from svn to git</title>
		<link>http://blog.trollgod.org.uk/2009/03/moving-from-svn-to-git/</link>
		<comments>http://blog.trollgod.org.uk/2009/03/moving-from-svn-to-git/#comments</comments>
		<pubDate>Tue, 03 Mar 2009 21:20:26 +0000</pubDate>
		<dc:creator>Ghworg</dc:creator>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[versioncontrol]]></category>

		<guid isPermaLink="false">http://blog.trollgod.org.uk/?p=100</guid>
		<description><![CDATA[<p>I&#8217;ve spent most of the evening trying to figure out how to use git. For a long time I&#8217;ve wanted to have the repositories for some of my personal projects available on the web. For a time I was allowing external access to my apache internal apache server, but I&#8217;m wary about that because <span style="color:#777"> . . . &#8594; Read More: <a href="http://blog.trollgod.org.uk/2009/03/moving-from-svn-to-git/">Moving from svn to git</a></span>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve spent most of the evening trying to figure out how to use <a href="http://git-scm.com/about">git</a>.  For a long time I&#8217;ve wanted to have the repositories for some of my personal projects available on the web.  For a time I was allowing external access to my apache internal apache server, but I&#8217;m wary about that because I&#8217;m not confident about my ability to secure a box.</p>
<p>I was planning on setting subversion up on my <a href="http://www.dreamhost.com/">web host</a>, but I didn&#8217;t want to depend completely on that and mirroring subversion is non-trivial.  So today I decided to have a go at git, which is much more suited to this sort of thing.</p>
<p>Thankfully there is svn import capability built in to git, so converting my guinea-pig project over was a doddle.  Much more tricky was setting up all the syncing between the repos.  I think I have the magic incantations down now though.</p>
<pre>
git remote add NAME URL
git config branch.master.remote NAME
git config branch.master.merge refs/heads/master
</pre>
<p>I understand the first line, the other two <em>seem</em> to be necessary, but I don&#8217;t know exactly what they do yet.</p>
<p>Also, it is better to run <code>git pull</code> than <code>git push</code> when dealing with a destination that has checked out files as push doesn&#8217;t update them whilst pull does.</p>
<p>One thing that is a little weird is I can&#8217;t push changes from the live site to the public repo, which is on the same server.  But I can pull the changes down to my local machine then push back up to the public.  Tried a couple of different ways but all failed for one reason of another.</p>
<p>Treating the other repo as local throws up permissions issues, </p>
<pre>error: unable to create temporary sha1 filename</pre>
<pre>File exists</pre>
<p>, due to the way webdav is setup on dreamhost.  Treating it as remote (http) doesn&#8217;t work because the binary is compiled without curl support.  Still, the round-trip method works well enough.</p>
<p>I also installed <a href="http://git.or.cz/gitwiki/Gitweb">gitweb</a> and pointed it at the publicly accessable repo, this was very easy contrary to all the web pages I read about it.  Just name the config file gitweb_config.perl and tell it where to look for the git repos and away it went <img src='http://blog.trollgod.org.uk/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> .</p>
<p><a href="http://git.trollgod.org.uk/">http://git.trollgod.org.uk/</a> is now available for anyone to view.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.trollgod.org.uk/2009/03/moving-from-svn-to-git/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Home in subversion</title>
		<link>http://blog.trollgod.org.uk/2009/02/home-in-subversion/</link>
		<comments>http://blog.trollgod.org.uk/2009/02/home-in-subversion/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 21:15:16 +0000</pubDate>
		<dc:creator>Ghworg</dc:creator>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://blog.trollgod.org.uk/?p=38</guid>
		<description><![CDATA[<p>I&#8217;ve mentioned previously that I&#8217;ve started putting my /home in subversion. I thought I&#8217;d go into how I handle things, as it takes a little adjustment in your thinking to get maximum benefit from this. I used this guide to get me started, and stuck pretty close to it.</p> <p>What I do is seperate <span style="color:#777"> . . . &#8594; Read More: <a href="http://blog.trollgod.org.uk/2009/02/home-in-subversion/">Home in subversion</a></span>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve mentioned previously that I&#8217;ve started putting my /home in <a href="http://subversion.tigris.org/">subversion</a>.  I thought I&#8217;d go into how I handle things, as it takes a little adjustment in your thinking to get maximum benefit from this.  I used <a href="http://toykeeper.net/tutorials/svnhome">this guide</a> to get me started, and stuck pretty close to it.</p>
<p>What I do is seperate settings files into two groups, common and local (I don&#8217;t have any other data in home, that all lives on it&#8217;s own partition).  Local settings are unique to each machine.  Common settings are identical across all the machines the programs are used on.  There are a few special cases that live in both worlds, like bash, but I&#8217;ll get to how I handle those later.</p>
<p>Each machine on my network has it&#8217;s own branch in the svn repo, and in each of those branches are two extra dirs, called &#8220;.svncommon&#8221; and &#8220;.svnlocal&#8221;.  Inside these there are category dirs like &#8220;Bash&#8221;, &#8220;Devel&#8221;, &#8220;Internet&#8221; etc. that allow me to group together the settings for programs to make management easier.  The .svnlocal one is not really necessary, I could just keep all the settings for the local group in the root of home instead of having them in .svnlocal and symlinks to those files in home but I like the symmetry of handling local files the same way as common ones.</p>
<p>Anyway, the category dirs in the common group are setup to use the <a href="http://svnbook.red-bean.com/en/1.1/ch07s04.html">svn:externals</a> feature, so that they are actually connected to dirs in the trunk of the repo.  So the files in ~/.svncommon/Devel are actually located in /trunk/Devel in the repo.</p>
<p>Here is the basic procedure I use to add a new machine to the shared setup (I assume the repo exists already).</p>
<ol>
<li>First we need to add a branch for the new machine &#8220;<code>svn mkdir svn://server/Repo/branches/MACHINE</code>&#8220;</li>
<li>Then link the homedir to that branch so we can add the files &#8220;<code>svn co svn://server/Repo/branches/MACHINE .</code>&#8220;</li>
<li>Create the two dirs for the local and common files &#8220;<code>svn mkdir .svnlocal .svncommon</code>&#8220;</li>
<li>Setup the links to the common stuff&#8221;<code>svn propedit svn:externals .svncommon</code>&#8221;<br />
<code>Bash/                   svn://$REPO/trunk/Bash<br />
GuiInternet/    svn://$REPO/trunk/GuiInternet<br />
Internet/               svn://$REPO/trunk/Internet<br />
Devel/                  svn://$REPO/trunk/Devel</code></li>
<li>&#8220;<code>svn ci .</code>&#8220;</li>
<li>&#8220;<code>svn up</code>&#8220;</li>
</ol>
<p>To add stuff to the repository you simply move it into one of the subdirs of .svnlocal or .svncommon.  Then create a symlink to it in ~/ so the program can still access the file.  Then &#8220;<code>svn add</code>&#8221; both the file and the symlink.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.trollgod.org.uk/2009/02/home-in-subversion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

