<?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>Stereo Interactive &#38; Design &#187; SVN</title>
	<atom:link href="http://stereointeractive.com/blog/tag/svn/feed/" rel="self" type="application/rss+xml" />
	<link>http://stereointeractive.com/blog</link>
	<description>Development Blog</description>
	<lastBuildDate>Wed, 07 Jul 2010 19:16:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Getting a new developer started on an existing symfony project</title>
		<link>http://stereointeractive.com/blog/2009/08/20/getting-a-new-developer-started-on-an-existing-symfony-project/</link>
		<comments>http://stereointeractive.com/blog/2009/08/20/getting-a-new-developer-started-on-an-existing-symfony-project/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 17:24:20 +0000</pubDate>
		<dc:creator>Scott Meves</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[SVN]]></category>
		<category><![CDATA[Symfony]]></category>

		<guid isPermaLink="false">http://stereointeractive.com/blog/?p=305</guid>
		<description><![CDATA[Here is the basic process we use to get a new developer started on a symfony project. This flow assumes you already have created your symfony project and it checked into an svn repository somewhere, and that the developer is on a mac. 
1. Checkout code from SVN into your ~/Sites folder. From the command [...]]]></description>
			<content:encoded><![CDATA[<p>Here is the basic process we use to get a new developer started on a symfony project. This flow assumes you already have created your symfony project and it checked into an svn repository somewhere, and that the developer is on a mac. <span id="more-305"></span></p>
<p>1. Checkout code from SVN into your ~/Sites folder. From the command line do:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span class="kw2">svn</span> <span class="kw2">co</span> <span class="br0">&#91;</span>path to repository<span class="br0">&#93;</span> ~<span class="sy0">/</span>Sites<span class="sy0">/</span><span class="br0">&#91;</span>projectname<span class="br0">&#93;</span> <span class="re5">--username</span> <span class="br0">&#91;</span>username<span class="br0">&#93;</span></pre></div></div>

<p>After the checkout, go into your new [projectname] directory and do a fix permissions:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">.<span class="sy0">/</span>symfony fix-perms</pre></div></div>

<p>2. Create a new virtual host in apache. You can skip this step but I find it makes things easier. My entry in my apache .conf file (on my mac its located at /etc/apache2/users/[username].conf where [username] is the username on my mac) looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span class="sy0">&lt;</span>VirtualHost <span class="sy0">*</span>:<span class="nu0">80</span><span class="sy0">&gt;</span>
	ServerName <span class="br0">&#91;</span>projectname<span class="br0">&#93;</span>.local
	DocumentRoot <span class="sy0">/</span>Users<span class="sy0">/</span><span class="br0">&#91;</span>myusername<span class="br0">&#93;</span><span class="sy0">/</span>Sites<span class="sy0">/</span><span class="br0">&#91;</span>projectname<span class="br0">&#93;</span><span class="sy0">/</span>web
<span class="sy0">&lt;/</span>VirtualHost<span class="sy0">&gt;</span></pre></div></div>

<p>I also have add this new domain to my local hosts file at /etc/hosts:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">127.0.0.1   <span class="br0">&#91;</span>projectname<span class="br0">&#93;</span>.local</pre></div></div>

<p>then i restart my webserver with a &#8220;sudo apachectl graceful&#8221;.</p>
<p>3. set up your local database. On my mac I use Sequel Pro to create the database. I run a..</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">.<span class="sy0">/</span>symfony propel-build-all</pre></div></div>

<p>..to regenerate the sql and base model classes. Often I don&#8217;t like to commit auto-generated code to svn but rather just the source files from which the new code is generated (you can read the side bar &#8220;Best Practice: Checkin all the canonical stuff, and nothing else&#8221; with one view on this at http://www.ericsink.com/scm/scm_repositories.html).</p>
<p>Once that is done, normally I would insert the db schema into my new database, like this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mysql <span class="re5">-u</span> root <span class="br0">&#91;</span>dbname<span class="br0">&#93;</span> <span class="sy0">&lt;</span> data<span class="sy0">/</span>sql<span class="sy0">/</span>lib.model.schema.sql</pre></div></div>

<p>&#8230; but sometimes I want to use a lot of the same basic data from before, so I insert database dump that has actual content:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mysql <span class="re5">-u</span> root <span class="br0">&#91;</span>dbname<span class="br0">&#93;</span> <span class="sy0">&lt;</span> data<span class="sy0">/</span>sql<span class="sy0">/</span>latest.sql</pre></div></div>

<p>4. configure the symfony project to use your new db. You&#8217;ll have to copy the config/databases.yml-dist to database.yml and add your own settings there. The databases.yml file is ignored in our repository, so that way the devs can keep different local configuration settings for our dev environment without having to create lots of different symfony environments (usually I keep them to just dev, stage, production) in the project.</p>
<p>5. load up http://[projectname].local/frontend_dev.php to see if things are working!</p>
]]></content:encoded>
			<wfw:commentRss>http://stereointeractive.com/blog/2009/08/20/getting-a-new-developer-started-on-an-existing-symfony-project/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>View all ignored patterns set with svn:ignore recursively in an svn repository</title>
		<link>http://stereointeractive.com/blog/2009/08/09/view-all-ignored-patterns-set-with-svnignore-recursively-in-an-svn-repository/</link>
		<comments>http://stereointeractive.com/blog/2009/08/09/view-all-ignored-patterns-set-with-svnignore-recursively-in-an-svn-repository/#comments</comments>
		<pubDate>Sun, 09 Aug 2009 21:21:24 +0000</pubDate>
		<dc:creator>Scott Meves</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[SVN]]></category>

		<guid isPermaLink="false">http://stereointeractive.com/blog/?p=285</guid>
		<description><![CDATA[I couldn&#8217;t figure out how to do this, so I posted it to stackoverflow and got a great response within minutes. That community is really great. 
The command to view all svn:ignore properties in an entire repository is:

svn propget -R svn:ignore .

Here is the link to my question on SO: How do I view all [...]]]></description>
			<content:encoded><![CDATA[<p>I couldn&#8217;t figure out how to do this, so I posted it to stackoverflow and got a great response within minutes. That community is really great. </p>
<p>The command to view all svn:ignore properties in an entire repository is:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span class="kw2">svn</span> propget <span class="re5">-R</span> <span class="kw2">svn</span>:ignore .</pre></div></div>

<p>Here is the link to my question on SO: <a href='http://stackoverflow.com/questions/1252270/how-do-i-view-all-ignored-patterns-set-with-svnignore-recursively-in-an-svn-repo'>How do I view all ignored patterns set with svn:ignore recursively in an svn repository? &#8211; Stack Overflow</a>.			</p>
]]></content:encoded>
			<wfw:commentRss>http://stereointeractive.com/blog/2009/08/09/view-all-ignored-patterns-set-with-svnignore-recursively-in-an-svn-repository/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Springloops deployment with svn externals</title>
		<link>http://stereointeractive.com/blog/2009/07/31/springloops-deployment-with-svn-externals/</link>
		<comments>http://stereointeractive.com/blog/2009/07/31/springloops-deployment-with-svn-externals/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 17:28:34 +0000</pubDate>
		<dc:creator>Scott Meves</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[SVN]]></category>
		<category><![CDATA[Symfony]]></category>

		<guid isPermaLink="false">http://stereointeractive.com/blog/?p=279</guid>
		<description><![CDATA[We&#8217;ve been trying out springloops as a hosted svn solution for one of our smaller projects, and so far it does the job just fine. We are using it to host the subversion repository for a symfony project. We generally like to use svn:externals for the symfony library files themselves, this way it its easy [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve been trying out <a href="http://springloops.com">springloops</a> as a hosted svn solution for one of our smaller projects, and so far it does the job just fine. We are using it to host the subversion repository for a symfony project. We generally like to use svn:externals for the symfony library files themselves, this way it its easy to upgrade symfony, make sure every deployment has the necessary code base without having to worry about having PEAR installed on every server. <span id="more-279"></span></p>
<p>Springloops has a feature that will automatically copy your latest code to a server you specify, either automatically with every commit, or manually whenever you need it. Immediately I ran into a problem: <strong>Springloops will not fetch any code in an external repository and copy it to your server. </strong> This means that when we tried to auto-deploy our little app, all of the symfony files were missing!</p>
<p>Here is what their support (which was speedy, I might add, even for a free account like ours) says:</p>
<blockquote><p>Unfortunately deploying externals is not supported at the moment. The reason is it slows down the entire process because our engine would have to download changelog and file contents from remote servers. We are working on a solution to speed it up, but for now you will have to upload it manually just like you said. You might consider using svn export rather than checkout to avoid placing &#8220;.svn&#8221; control directories on your server.</p></blockquote>
<p>Good to know. So, given that information, here is a list of possible ways to easily deploy changes to your project:</p>
<ul>
<li>Use rsync. With symfony this is easy with the &#8220;project-deploy&#8221; command line tool. This is my preferred method because it&#8217;s just so darn easy, and lets me get away upload changes that aren&#8217;t yet committed to svn (gasp).</li>
<li>Checkout a version of your project from SVN on your server. When it comes time to upgrade, do an &#8220;<a href="http://svnbook.red-bean.com/en/1.1/re28.html">svn up</a>&#8221; or &#8220;<a href="http://svnbook.red-bean.com/en/1.0/re27.html">svn switch</a>&#8221; to get the latest changes or switch to another tagged release.</li>
<li>Do an <a href="http://svnbook.red-bean.com/en/1.0/re10.html">svn export</a> as suggested by the support guy to avoid placing the &#8220;.svn&#8221; directories on the server. If you don&#8217;t prevent access to these directories on your web server, <a href="http://www.adamgotterer.com/2009/01/26/hacking-the-svn-directory/">it can pose a serious risk</a>.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://stereointeractive.com/blog/2009/07/31/springloops-deployment-with-svn-externals/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Install/Upgrade Subversion on Mac OS X</title>
		<link>http://stereointeractive.com/blog/2009/05/05/installupgrade-subversion-on-mac-os-x/</link>
		<comments>http://stereointeractive.com/blog/2009/05/05/installupgrade-subversion-on-mac-os-x/#comments</comments>
		<pubDate>Tue, 05 May 2009 15:49:39 +0000</pubDate>
		<dc:creator>Scott Meves</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[SVN]]></category>

		<guid isPermaLink="false">http://stereointeractive.com/blog/?p=206</guid>
		<description><![CDATA[This is a great tutorial on SVN and it also includes a Intel disk image of SVN 1.6.1 which makes installing a breeze. 
Subversion With Mac OS X Tutorial.
]]></description>
			<content:encoded><![CDATA[<p>This is a great tutorial on SVN and it also includes a Intel disk image of SVN 1.6.1 which makes installing a breeze. </p>
<p><a href='http://www.rubyrobot.org/tutorial/subversion-with-mac-os-x'>Subversion With Mac OS X Tutorial</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://stereointeractive.com/blog/2009/05/05/installupgrade-subversion-on-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Recursively delete .svn directories</title>
		<link>http://stereointeractive.com/blog/2009/02/17/recursively-delete-svn-directories/</link>
		<comments>http://stereointeractive.com/blog/2009/02/17/recursively-delete-svn-directories/#comments</comments>
		<pubDate>Tue, 17 Feb 2009 21:32:44 +0000</pubDate>
		<dc:creator>Scott Meves</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[SVN]]></category>

		<guid isPermaLink="false">http://stereointeractive.com/blog/?p=164</guid>
		<description><![CDATA[This came in handy today when I copied a directory from another project and didn&#8217;t recognize that it was under version control in that project. Needless to say, my current project got very confused during an svn commit when it encountered this copied directory. To reconcile the situation, I had to recursively delete all of [...]]]></description>
			<content:encoded><![CDATA[<p>This came in handy today when I copied a directory from another project and didn&#8217;t recognize that it was under version control in that project. Needless to say, my current project got very confused during an svn commit when it encountered this copied directory. To reconcile the situation, I had to recursively delete all of the .svn directories from the copied directory, and then check it in as a fresh copy to the new project. <span id="more-164"></span></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span class="kw2">find</span> . <span class="re5">-type</span> d <span class="re5">-name</span> .svn <span class="re5">-exec</span> <span class="kw2">rm</span> <span class="re5">-rf</span> <span class="br0">&#123;</span><span class="br0">&#125;</span> \;</pre></div></div>

<p>Update 1: Thanks to <a href="http://wizardishungry.com">Jon</a> for this improved method!</p>
<p>Update 2: I have this in my notes too, but I don&#8217;t know enough about the shell to know which is better.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span class="kw2">find</span> . <span class="re5">-iname</span> <span class="st_h">'.svn'</span> <span class="re5">-print0</span> <span class="sy0">|</span> <span class="kw2">xargs</span> <span class="re5">-0</span> <span class="kw2">rm</span> <span class="re5">-rf</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://stereointeractive.com/blog/2009/02/17/recursively-delete-svn-directories/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>SVN merge trunk changes to your branch</title>
		<link>http://stereointeractive.com/blog/2009/02/17/svn-merge-trunk-changes-to-your-branch/</link>
		<comments>http://stereointeractive.com/blog/2009/02/17/svn-merge-trunk-changes-to-your-branch/#comments</comments>
		<pubDate>Tue, 17 Feb 2009 17:43:59 +0000</pubDate>
		<dc:creator>Scott Meves</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[SVN]]></category>

		<guid isPermaLink="false">http://stereointeractive.com/blog/?p=157</guid>
		<description><![CDATA[I always have to look up the documentation on how to merge a whole SVN branch to another. Today there were bug fixes to trunk of my project that I wanted to port into my branch. I expected this to be easy since I hadn&#8217;t made many changes to my branch, and no changes to [...]]]></description>
			<content:encoded><![CDATA[<p>I always have to look up the documentation on how to merge a whole SVN branch to another. Today there were bug fixes to trunk of my project that I wanted to port into my branch. I expected this to be easy since I hadn&#8217;t made many changes to my branch, and no changes to the same files that were modified in the trunk.<span id="more-157"></span></p>
<p>Using <a href='http://svnbook.red-bean.com/en/1.4/svn.branchmerge.commonuses.html'>Common Use-Cases</a> as a reference, this is what I did:</p>
<p>From within my branch:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span class="kw2">svn</span> log</pre></div></div>

<p>This displays the revision number for when my branch was created:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span class="re5">------------------------------------------------------------------------</span>
r23 <span class="sy0">|</span> stereosv <span class="sy0">|</span> <span class="nu0">2009</span>-02-<span class="nu0">17</span> <span class="nu0">11</span>:<span class="nu0">42</span>:<span class="nu0">28</span> <span class="re5">-0500</span> <span class="br0">&#40;</span>Tue, <span class="nu0">17</span> Feb <span class="nu0">2009</span><span class="br0">&#41;</span> <span class="sy0">|</span> <span class="nu0">1</span> line
&nbsp;
creating branch <span class="kw1">for</span> xyz</pre></div></div>

<p>Now I need to find out what revision number the trunk is at. Perfoming an &#8220;svn update&#8221; within the trunk shows me what version it&#8217;s at.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span class="sy0">&gt;</span> <span class="kw2">svn</span> update
At revision 25.</pre></div></div>

<p>In my case the trunk is at revision 25&#8230; implying there were only two commits since the time I checked out my branch. Nice.</p>
<p>Now, it&#8217;s time to carry merge these changes into my branch. Back in my branch directory, it&#8217;s time to put these revision numbers to good use.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span class="kw2">svn</span> merge <span class="re5">-r</span> <span class="nu0">23</span>:<span class="nu0">25</span> <span class="kw2">svn</span>+<span class="kw2">ssh</span>:<span class="sy0">//</span>username<span class="sy0">@</span>svnserver<span class="sy0">/</span>home<span class="sy0">/</span>username<span class="sy0">/</span>svn<span class="sy0">/</span>project<span class="sy0">/</span>trunk</pre></div></div>

<p>What this does is merge the changes that were made between revision 23 (when I created my branch) and revision 25 (the most recent revision of the trunk) in the trunk into my working copy.</p>
<p>Now, it&#8217;s time to check in my branch, with the updated changes from the trunk.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span class="kw2">svn</span> ci <span class="re5">-m</span> <span class="st0">&quot;Merged trunk changes r23:25 into my branch&quot;</span></pre></div></div>

<p>SVN 1.5 has made some improvements to the way merging works.. So check your SVN version with &#8220;svn &#8211;version&#8221; to make sure you are using the right syntax for your version. </p>
]]></content:encoded>
			<wfw:commentRss>http://stereointeractive.com/blog/2009/02/17/svn-merge-trunk-changes-to-your-branch/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using svnX with svn+ssh on a non-standard port</title>
		<link>http://stereointeractive.com/blog/2008/02/09/using-svnx-with-svnssh-on-a-non-standard-port/</link>
		<comments>http://stereointeractive.com/blog/2008/02/09/using-svnx-with-svnssh-on-a-non-standard-port/#comments</comments>
		<pubDate>Sat, 09 Feb 2008 22:02:34 +0000</pubDate>
		<dc:creator>Scott Meves</dc:creator>
				<category><![CDATA[OS X]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[SVN]]></category>

		<guid isPermaLink="false">http://blog.stereodevelopment.com/2008/02/09/using-svnx-with-svnssh-on-a-non-standard-port/</guid>
		<description><![CDATA[svnX is a great mac GUI for svn repositories. A lot of our svn servers are accessed via non-standard ports for security, and a limitation of the svn+ssh syntax is that you can&#8217;t specify a non-standard port in the address name. To get around this in the command line, you can set a local environment [...]]]></description>
			<content:encoded><![CDATA[<p><strong>svnX</strong> is a great mac GUI for svn repositories. A lot of our svn servers are accessed via non-standard ports for security, and a limitation of the svn+ssh syntax is that you can&#8217;t specify a non-standard port in the address name. To get around this in the command line, you can set a local environment variable &#8220;SVN_SSH&#8221; like so: <span id="more-71"></span></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">export SVN_SSH<span class="sy0">=</span><span class="st0">&quot;ssh -p xxxx&quot;</span></pre></div></div>

<p>where xxxx is the port number. That works well if all of your SVN repositories that you access via SSH use the same port number, and if you *don&#8217;t* use svnX.</p>
<p>svnX doesn&#8217;t use your .bash_login environment variables before running it&#8217;s commands, so it&#8217;s doesn&#8217;t see you want to use a non-standard ssh. However, you *can* add custom ssh hostnames that use your non standard port, and then pass these to svnX as the path. </p>
<p>Open up ~/.ssh/config (or create it if it doesn&#8217;t exist) and add a host name like so:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">host svn1
  Hostname svn<span class="sy0">.</span>yourdomain<span class="sy0">.</span>com
  Port xxxx
  ForwardAgent no
  ForwardX11 no</pre></div></div>

<p>And then finally, when you put in the path in svnx, use &#8220;svn1&#8243; as the hostname:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">Path<span class="sy0">:</span> svn<span class="sy0">+</span>ssh<span class="sy0">:</span><span class="co1">//username@svn1/path/to/repository</span></pre></div></div>

<p>svnX will now be able to access your svn repository through a non-standard ssh port.</p>
]]></content:encoded>
			<wfw:commentRss>http://stereointeractive.com/blog/2008/02/09/using-svnx-with-svnssh-on-a-non-standard-port/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>svn, apache2, os x leopard 10.5</title>
		<link>http://stereointeractive.com/blog/2008/01/21/svn-apache2-os-x-leopard-105/</link>
		<comments>http://stereointeractive.com/blog/2008/01/21/svn-apache2-os-x-leopard-105/#comments</comments>
		<pubDate>Mon, 21 Jan 2008 14:50:27 +0000</pubDate>
		<dc:creator>Scott Meves</dc:creator>
				<category><![CDATA[OS X]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[SVN]]></category>

		<guid isPermaLink="false">http://blog.stereodevelopment.com/2008/01/21/svn-apache2-os-x-leopard-105/</guid>
		<description><![CDATA[Mac OS 10.5 Leopard ships with Apache2 and SVN. However, if you want to keep a local svn repository and not use an external svn server (only really useful if you have projects which you will be the only developer), you have to set up the repository yourself. Here is a quick cheat-sheet to help [...]]]></description>
			<content:encoded><![CDATA[<p>Mac OS 10.5 Leopard ships with Apache2 and SVN. However, if you want to keep a local svn repository and not use an external svn server (only really useful if you have projects which you will be the only developer), you have to set up the repository yourself. Here is a quick cheat-sheet to help you do just that.<span id="more-66"></span></p>
<h2>Make the repository</h2>
<p>Substitute REPOSNAME with the name of your repository (aka the project name).</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">$ sudo <span class="kw3">mkdir</span> <span class="sy0">/</span>usr<span class="sy0">/</span>local<span class="sy0">/</span>svn
$ sudo <span class="kw3">mkdir</span> <span class="sy0">/</span>usr<span class="sy0">/</span>local<span class="sy0">/</span>REPOSNAME
$ sudo svnadmin create <span class="sy0">/</span>usr<span class="sy0">/</span>local<span class="sy0">/</span>svn<span class="sy0">/</span>REPOSNAME
$ sudo <span class="kw3">chown</span> <span class="sy0">-</span>R www<span class="sy0">:</span>www <span class="sy0">/</span>usr<span class="sy0">/</span>local<span class="sy0">/</span>svn<span class="sy0">/</span>REPOSNAME</pre></div></div>

<h2>Configure Apache</h2>
<p>I used textmate to edit a new text file named svn.conf, you can use vi or whatever you want.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">$ cd <span class="sy0">/</span>etc<span class="sy0">/</span>apache2<span class="sy0">/</span>other
$ mate svn<span class="sy0">.</span>conf</pre></div></div>

<p>Inside /etc/apache2/other/svn.conf:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">LoadModule dav_svn_module <span class="sy0">/</span>usr<span class="sy0">/</span>libexec<span class="sy0">/</span>apache2<span class="sy0">/</span>mod_dav_svn<span class="sy0">.</span>so
<span class="sy0">&lt;</span>Location <span class="sy0">/</span>svn<span class="sy0">&gt;</span>
  DAV svn
  SVNParentPath <span class="sy0">/</span>usr<span class="sy0">/</span>local<span class="sy0">/</span>svn
<span class="sy0">&lt;/</span>Location<span class="sy0">&gt;</span></pre></div></div>

<p>And now restart apache&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">$ sudo apachectl graceful</pre></div></div>

<p>Finally, check out your repository to make sure it worked: <code>http://localhost/svn/REPOSNAME</code>.</p>
<p><img src='http://blog.stereodevelopment.com/wp-content/uploads/2008/01/svn-apache2.png' alt='svn apache2 leopard' /></p>
<h2>Final notes</h2>
<p>You may want to secure access to your repository through a password file. In a nutshell, you can use something like <code>sudo htpasswd -cm /etc/apache2/auth/svn USERNAME</code> (you can create this file anywhere but I like to keep all my auth files in a custom &#8220;auth&#8221; directory). Then edit your svn.conf file and add these lines right before the closing &#8216;Location&#8217; tag:</p>
<p>Inside /etc/apache2/other/svn.conf:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">AuthType Basic
AuthName <span class="st0">&quot;SVN&quot;</span>
AuthUserFile <span class="sy0">/</span>etc<span class="sy0">/</span>apache2<span class="sy0">/</span>auth<span class="sy0">/</span>svn
<span class="kw1">Require</span> valid<span class="sy0">-</span>user</pre></div></div>

<p>If you need more detailed instructions you should head over <a href="http://blog.paploo.net/2007/10/how-to-manage-your-own-subversion.html">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://stereointeractive.com/blog/2008/01/21/svn-apache2-os-x-leopard-105/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>svn export and zip</title>
		<link>http://stereointeractive.com/blog/2007/06/13/svn-export-and-zip/</link>
		<comments>http://stereointeractive.com/blog/2007/06/13/svn-export-and-zip/#comments</comments>
		<pubDate>Wed, 13 Jun 2007 19:15:43 +0000</pubDate>
		<dc:creator>Scott Meves</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[SVN]]></category>

		<guid isPermaLink="false">http://blog.stereodevelopment.com/2007/06/13/svn-export-and-zip/</guid>
		<description><![CDATA[Sometimes it&#8217;s necessary to make a copy of a project stored in an SVN repository. If you just copy the directory manually, you will also be copying those sneaky .svn files that exist in every directory in the project. Instead you should use the svn export command. This will make a new copy of all [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes it&#8217;s necessary to make a copy of a project stored in an SVN repository. If you just copy the directory manually, you will also be copying those sneaky .svn files that exist in every directory in the project. Instead you should use the <code>svn export</code> command. This will make a new copy of all of the files in the respository than you can zip up and send off to whomever you please.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">svn export <span class="kw3">file</span><span class="sy0">:</span><span class="co1">///path/to/your/repository my_export</span></pre></div></div>

<p>If you want to zip this baby up:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">zip <span class="sy0">-</span>r my_export<span class="sy0">.</span>zip my_export</pre></div></div>

<p>If you wanted to get really creative, and tag this export as a release, you could something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">svn <span class="kw3">copy</span> <span class="kw3">file</span><span class="sy0">:</span><span class="co1">///path/to/repos/trunk file:///path/to/repos/tags/1.0release -m &quot;tagging version 1.0 release&quot;</span>
svn export <span class="kw3">file</span><span class="sy0">:</span><span class="co1">///path/to/repos/tags/1.0release 1.0release</span>
<span class="co2"># for a zip:
</span>zip <span class="sy0">-</span>r 1<span class="sy0">.</span>0release<span class="sy0">.</span>zip 1<span class="sy0">.</span>0release<span class="sy0">/</span>
<span class="co2"># for a tgz
</span>tar <span class="sy0">-</span>czvf 1<span class="sy0">.</span>0release<span class="sy0">.</span>tgz 1<span class="sy0">.</span>0release<span class="sy0">.</span>zip<span class="coMULTI">/*</span></pre></div></div>

<p>References:</p>
<ul>
<li>http://svnbook.red-bean.com/en/1.1/re10.html</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://stereointeractive.com/blog/2007/06/13/svn-export-and-zip/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
