<?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>-= n8v =- &#187; subversion</title>
	<atom:link href="http://n8v.enteuxis.org/tags/subversion/feed/" rel="self" type="application/rss+xml" />
	<link>http://n8v.enteuxis.org</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Tue, 27 Sep 2011 00:52:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2-beta2-18055</generator>
		<item>
		<title>Deny access to .svn directories with IIS</title>
		<link>http://n8v.enteuxis.org/2009/11/deny-access-to-svn-directories-with-iis/</link>
		<comments>http://n8v.enteuxis.org/2009/11/deny-access-to-svn-directories-with-iis/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 21:40:38 +0000</pubDate>
		<dc:creator>nathan</dc:creator>
				<category><![CDATA[Figuring IT Out]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[obscurity]]></category>
		<category><![CDATA[rewrite]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://n8v.enteuxis.org/?p=295</guid>
		<description><![CDATA[The problem: I like using Subversion to deploy web content to production servers. I check in everything while I&#8217;m working on the development copy, then check out onto the server when it&#8217;s ready. Subversion creates a .svn directory contain readable copies of all your files, which is bad for server-processed files like .php or .aspx [...]]]></description>
			<content:encoded><![CDATA[<h3>The problem:</h3>

<p>I like using Subversion to deploy web content to production servers.  I check in everything while I&#8217;m working on the development copy, then check out onto the server when it&#8217;s ready.</p>

<p>Subversion creates a <code>.svn</code> directory contain readable copies of all your files, which is bad for server-processed files like .php or .aspx that you don&#8217;t want readable by, say, <a href="http://en.wikipedia.org/wiki/Google_hacking">Google Hackers</a>.</p>

<p>I have thought about this before but when I went to do it I couldn&#8217;t find any clear guides online.  I did find <a href="http://serverfault.com/questions/23340/ignoring-svn-directories-under-iis/83480#83480">this question at Server Fault</a>, which is a newish sister of <a href="http://stackoverflow.com">Stack Overflow</a>, which reminds me kind of Experts Exchange but without the suck.  Except that in this case the answers sucked.   So I figured it out and added my answer and am posting it here too:
<span id="more-295"></span></p>

<hr />

<p>&#8220;Don&#8217;t do it that way&#8221; does not answer the question.</p>

<p>Practically, I like having a working copy on the production server, because that way I can make quick changes in production (who has never done that?) and check them back in.  It depends on where you want your security/convenience slider, and in many cases this is a good place.</p>

<p>The standard solution in Apacheland is to leave the .svn files there but tell the web server to never serve them.  Here&#8217;s how to do that with IIS 5 through 7 on Windows NT4 through 2008.</p>

<ol>
<li><p>Download and install <a href="http://www.helicontech.com/isapi_rewrite/">ISAPI_Rewrite</a> &#8212; the Lite version will be enough for this purpose.  There are two versions, version 2 and 3.  Use ISAPI_Rewrite3 unless you need to support NT4.    Also, note the extra <a href="http://www.helicontech.com/isapi_rewrite/doc/sysreq.htm">IIS features</a> you need to enable for Win 2008.<br />
<strong>Warning</strong>&#8211; the MSI installer may stop and start IIS.</p></li>
<li><p>Launch the <em>Helicon->ISAPI_Rewrite3->ISAPI_Rewrite Manager</em> app from the Start Menu.  It makes editing the config file (installed in <em>C:\Program Files\Helicon\ISAPI_Rewrite3\httpd.conf</em> by default) easier, but you can also do it by hand.  <strong>note</strong>, the config file in ISAPI_Rewrite2 is named <em>httpd.ini</em> and is read-only by default.</p></li>
<li><p>Add these lines to <em>httpd.conf</em>:</p></li>
</ol>


<div class="wp_syntax"><div class="code"><pre class="apache"><span class="co1"># Deny access to Subversion working copy administrative</span>
<span class="co1">#  directories (.svn) and their contents</span>
<span class="kw1">RewriteRule</span> .*/\.svn\b.* . [F,I,O]</pre></div></div>


<p>Now, any request for a .svn directory or its contents will result in a 404 Not Found from the server.</p>
]]></content:encoded>
			<wfw:commentRss>http://n8v.enteuxis.org/2009/11/deny-access-to-svn-directories-with-iis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding Subversion keywords to an entire Symfony project</title>
		<link>http://n8v.enteuxis.org/2008/10/adding-subversion-keywords-to-an-entire-symfony-project/</link>
		<comments>http://n8v.enteuxis.org/2008/10/adding-subversion-keywords-to-an-entire-symfony-project/#comments</comments>
		<pubDate>Tue, 07 Oct 2008 19:07:14 +0000</pubDate>
		<dc:creator>nathan</dc:creator>
				<category><![CDATA[Figuring IT Out]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://n8v.enteuxis.org/?p=90</guid>
		<description><![CDATA[For some reason, even though I&#8217;ve set default properties in my .subversion/config, it doesn&#8217;t always apply to new files, so I end up doing this once in a while: svn propset svn:keywords 'Id Rev URL HeadUrl' \ `find apps/ config/ doc/ lib/ web data/ test/ \ -name '*.php' -or -name '*.yml' -or -name '*.css' -or [...]]]></description>
			<content:encoded><![CDATA[<p>For some reason, even though I&#8217;ve set default properties in my <var>.subversion/config</var>, it doesn&#8217;t always apply to new files, so I end up doing this once in a while:</p>


<div class="wp_syntax"><div class="code"><pre class="bash"><span class="kw2">svn</span> propset <span class="kw2">svn</span>:keywords <span class="st_h">'Id Rev URL HeadUrl'</span> \
<span class="sy0">`</span><span class="kw2">find</span> apps<span class="sy0">/</span> config<span class="sy0">/</span> doc<span class="sy0">/</span> lib<span class="sy0">/</span> web data<span class="sy0">/</span> test<span class="sy0">/</span> \
<span class="re5">-name</span> <span class="st_h">'*.php'</span> <span class="re5">-or</span> <span class="re5">-name</span> <span class="st_h">'*.yml'</span> <span class="re5">-or</span> <span class="re5">-name</span> <span class="st_h">'*.css'</span> <span class="re5">-or</span> <span class="re5">-name</span> <span class="st_h">'*.sql'</span><span class="sy0">`</span></pre></div></div>


<p>This tells Subversion to go into those types of files and update <a href="http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html">the <code>$Id$</code> and other keyword tags</a>.</p>

<p>(Note, I&#8217;ve been fooled before by not noticing the keywords are CASE-SENSITIVE.  If you set them to &#8216;id rev url headURL&#8217; they will NOT work!)</p>

<p>It works with <a href="http://cygwin.com">Cygwin</a>, if you&#8217;re stuck in Windowsland like I am for local development.</p>
]]></content:encoded>
			<wfw:commentRss>http://n8v.enteuxis.org/2008/10/adding-subversion-keywords-to-an-entire-symfony-project/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

