

<?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>pixeldiva &#187; subversion</title>
	<atom:link href="http://www.pixeldiva.co.uk/tag/subversion/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pixeldiva.co.uk</link>
	<description></description>
	<lastBuildDate>Sun, 29 Aug 2010 13:23:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Setting up local Subversion for use with Coda and MAMP</title>
		<link>http://www.pixeldiva.co.uk/shares/setting-up-local-subversion-for-use-with-coda-and-mamp/</link>
		<comments>http://www.pixeldiva.co.uk/shares/setting-up-local-subversion-for-use-with-coda-and-mamp/#comments</comments>
		<pubDate>Sat, 29 Aug 2009 13:03:16 +0000</pubDate>
		<dc:creator>Ann</dc:creator>
				<category><![CDATA[shares]]></category>
		<category><![CDATA[coda]]></category>
		<category><![CDATA[MAMP]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://www.pixeldiva.co.uk/?p=225</guid>
		<description><![CDATA[I spent most of last year using Subversion via command line at the request of the client I was working with at the time. Because I&#8217;m geeky in a different way to those who are comfortable in commandlineville, it was all set up for me, and all I had to cope with were the commands [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>I spent most of last year using Subversion via command line at the request of the client I was working with at the time.</p>
<p>Because I&#8217;m geeky in a different way to those who are comfortable in commandlineville, it was all set up for me, and all I had to cope with were the commands to check out, check in, and occasionally, resolve a conflict.</p>
<p>In time, I got reasonably comfortable with those commands but I had no real idea how to go about setting up Subversion (or any other version control system) for myself, and haven&#8217;t had or felt the need to do so until now.</p>
<p>I had hoped that I&#8217;d be able to find an easy to follow tutorial online, but either my googlefu has failed me, or it doesn&#8217;t exist. What I did find were several tutorials that assume that you&#8217;re comfortable with the command line or that you know how subversion works and what to do, and that isn&#8217;t me, so I figured I&#8217;d set out what I did, in the hope that it might be helpful to a) someone else and b) me, when I come to do this again and realise I&#8217;ve completely forgotten what I did.</p>
<p><span id="more-225"></span></p>
<p>Disclaimer: This may not be the absolute best way to go about this, but it&#8217;s what I did and it works. If there are better ways to do any of these steps, I&#8217;d love to know, so please leave a comment.</p>
<h2>Step 1: Setting up Subversion</h2>
<p>Follow the first part of the instructions handily provided at <a href="http://www.rubyrobot.org/tutorial/subversion-with-mac-os-x">Ruby Robot&#8217;s Subversion With Mac OS X Tutorial</a> but stop when you get to &#8220;Creating a Sample Subversion Project&#8221;.</p>
<h2>Step 2: Create a Repository</h2>
<p>In a fresh Terminal window, I changed directory to my MAMP directory htdocs folder by typing cd [path/to/htdocs] where in my case it was cd ../../../Applications/MAMP/htdocs (because MAMP installs to the Applications folder and I don&#8217;t know how to/if you can move it without breaking it.</p>
<p>I then created the repository by using the command from the tutorial:</p>
<p>svnadmin create SVNrep</p>
<p>This created a SVNrep directory in my htdocs folder.</p>
<p>You could put the SVNrep directory wherever you like &#8211; I just wanted it close to my other working files.</p>
<h2>Step 3: Set up a username and password</h2>
<p>Use finder to go to the SVNrep directory, and find the conf directory. It will contain three files:</p>
<p>authz<br />
passwd<br />
svnserve.conf</p>
<p>Open svnserve.conf in whatever text editor you&#8217;re comfortable with and uncomment line 20 (delete the # and space) to use the default password file. Save it and close it.</p>
<p>Open the passwd file and add a username and password by typing:</p>
<p>username = password</p>
<p>on a new line at the bottom of the file. Save it and close it.</p>
<h2>Step 4: Add files to the repository</h2>
<p>To add the site I wanted to be version controlled to the repository, I typed the following into Terminal:</p>
<p>svn import [sitedirectory] file:///[path to SVNrep directory]/[sitename for respository] -m &#8220;Initial import&#8221;</p>
<p>Then held my breath and hit return.</p>
<h2>Step 5: Check out the files so you can work with them</h2>
<p>Because I&#8217;m a version control moron, I thought I could check out the files to the directory I&#8217;d imported them from and they&#8217;d be version controlled, but you can&#8217;t, so I used the following command to check them out to a different directory.</p>
<p>svn checkout file://[path to SVNrep dir/sitename from previous step] [newfolder]</p>
<p>Then held my breath and pressed return again.</p>
<h2>Step 6: Set up new site in Coda</h2>
<p>If you&#8217;re setting up a new site once you&#8217;ve done all the previous steps and you choose the [newfolder] you set up in the previous step, it should detect that it&#8217;s version controlled and the details should appear in the Source Control panel at the bottom of the new site dialog.</p>
<p>If this doesn&#8217;t happen automatically, put the full path to your repository (the bit immediately after checkout in the previous step) in the Repository URL field.</p>
<p>It also works if you put the localhost url in (e.g., http://localhost:8888/[checkout folder]).</p>
<p>Then enter the username and password you created in Step 3.</p>
<h2>Step 7: Test that it all works</h2>
<p>Open your new site in Coda, find a file, open it and edit it.</p>
<p>When you save it, an M icon should appear next to the file name. Click this and a dialog should open up asking you to type a comment.</p>
<p>Type a comment, and hit commit.</p>
<h2>Step 8: Work with your newly version controlled site</h2>
<p>With help from <a href="http://svnbook.red-bean.com/">O&#8217;Reilly&#8217;s Version Control with Subversion free ebook</a> if you need it.</p>
<h2>Afterword</h2>
<p>Obviously, having spent ages writing all this up, I did a quick google for coda subversion guide to see if there were any good tutorials for subversion commands within Coda and found what I wish I&#8217;d found to begin with:</p>
<p><a href="http://glovestudio.com/blog/2009/05/12/installing-a-local-copy-of-subversion-for-use-with-panics-coda/"><br />
A designer’s guide to installing a local copy of Subversion for use with Coda</a></p>
<p>Typical, eh?</p>
<p>Still, I&#8217;ve done all this now so I&#8217;ll publish and be damned (or roundly mocked as a moron).</p>
 <img src="http://www.pixeldiva.co.uk/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=225" width="1" height="1" style="display: none;" />

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.pixeldiva.co.uk/shares/setting-up-local-subversion-for-use-with-coda-and-mamp/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>