<?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>Noemi Millman &#124; Triopter &#187; subversion</title>
	<atom:link href="http://triopter.com/archive/category/subversion/feed/" rel="self" type="application/rss+xml" />
	<link>http://triopter.com</link>
	<description>Hello.  My name is Noemi Millman, and Triopter is my web development agency.  We handcraft beautiful, dynamic websites.</description>
	<lastBuildDate>Tue, 24 Apr 2012 15:27:47 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Resolving &#8220;local delete, incoming delete upon update&#8221; Subversion Tree Conflicts</title>
		<link>http://triopter.com/archive/resolving-local-delete-incoming-delete-upon-update-subversion-tree-conflicts/</link>
		<comments>http://triopter.com/archive/resolving-local-delete-incoming-delete-upon-update-subversion-tree-conflicts/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 22:26:58 +0000</pubDate>
		<dc:creator>Noemi Millman</dc:creator>
				<category><![CDATA[subversion]]></category>

		<guid isPermaLink="false">http://triopter.com/?p=133</guid>
		<description><![CDATA[NOTE 1: Before doing this, try using the svn resolve command.
NOTE 2:  I&#8217;ve noticed a lot of traffic to this page for &#8220;local edit incoming delete on update&#8221; errors, which are not what this article is about (the solution below may or may not work for that &#8212; I have no idea).  This [...]]]></description>
			<content:encoded><![CDATA[<p><strong>NOTE 1: Before doing this, try using the <a href="http://svnbook.red-bean.com/en/1.5/svn.ref.svn.c.resolve.html" target="_blank">svn resolve</a> command.</strong></p>
<p><strong>NOTE 2:  I&#8217;ve noticed a lot of traffic to this page for &#8220;local edit incoming delete on update&#8221; errors, which are not what this article is about (the solution below may or may not work for that &#8212; I have no idea).  This article is about &#8220;local <em>delete</em>, incoming delete on update&#8221; errors.  Always back up your work before you muck around with something like this, but that goes doubly if you&#8217;re going to try to use these instructions for the &#8220;local edit&#8221; error. </strong></p>
<p>For reason I&#8217;m still trying to untangle, I encountered some really terrible conflicts this afternoon with an SVN checkin that didn&#8217;t complete properly, leaving me with a few locked directories that wouldn&#8217;t respond to &#8220;svn cleanup&#8221;.  </p>
<p>Using <a href="http://svn.haxx.se/users/archive-2006-01/0981.shtml" target="_blank">these instructions</a>, I was able to get the directories sorted out:</p>
<ol>
<li>Move offending directories out of working copy and to a safe place (e.g. desktop)</li>
<li>Run <code>svn cleanup</code></li>
<li>Run <code>svn up</code></li>
</ol>
<p>This actually restored the messed-up directories.  Some files were reverted and some deleted files restored; once the entire working copy is cleaned up, you can use the backup copies of the directories to copy back in your changes.  </p>
<p>But before I could do that, I was left with a half-dozen individual file conflicts with the following messages:</p>
<pre><code>
$ svn st
?   C some_file.php
    &gt; local delete, incoming delete upon update
?   C some_other_file.php
    &gt; local delete, incoming delete upon update
... etc.

</code></pre>
<p>Thankfully, these were files that I <em>did</em> want to delete, so even without instructions I wasn&#8217;t afraid to trial-and-error my way to the following fix:</p>
<pre><code>
$ touch some_file.php some_other_file.php
$ svn revert some_file.php some_other_file.php

</code></pre>
<p>Once you&#8217;ve created the files, SVN can revert them, which leaves them in unversioned status:</p>
<pre><code>
$ svn st
?    some_file.php
?    some_other_file.php

</code></pre>
<p>And then you can just delete them from the command line or whatever file manager you use.  </p>
<p>*Phew*</p>
<p>Once that was done I redid some deletions that had been overwritten by the update that cleaned up the directories, and all was right in the world.</p>
<p>Usual disclaimers, YMMV, etc.</p>
]]></content:encoded>
			<wfw:commentRss>http://triopter.com/archive/resolving-local-delete-incoming-delete-upon-update-subversion-tree-conflicts/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Subversion on OS X, Part 2: Your First Project</title>
		<link>http://triopter.com/archive/subversion-on-os-x-part-2-your-first-project/</link>
		<comments>http://triopter.com/archive/subversion-on-os-x-part-2-your-first-project/#comments</comments>
		<pubDate>Fri, 29 Dec 2006 20:45:55 +0000</pubDate>
		<dc:creator>Noemi Millman</dc:creator>
				<category><![CDATA[os x]]></category>
		<category><![CDATA[subversion]]></category>

		<guid isPermaLink="false">http://triopter.com/archive/subversion-on-os-x-part-2-your-first-project/</guid>
		<description><![CDATA[I ran into some permissions problems trying to actually get a project into the repository, so I thought I&#8217;d walk through how to get things working in just one try instead of twenty:

Do Not put your repository under your Apache web root, or any virtual host web root.  Just don&#8217;t.  It won&#8217;t work.
Apache [...]]]></description>
			<content:encoded><![CDATA[<p>I ran into some permissions problems trying to actually get a project into the repository, so I thought I&#8217;d walk through how to get things working in just one try instead of twenty:</p>
<ol>
<li><strong>Do Not</strong> put your repository under your Apache web root, or any virtual host web root.  Just don&#8217;t.  It won&#8217;t work.</li>
<li>Apache needs read and write permissions on your Subversion directory.  The simplest but perhaps not the most secure way to do this is, after you create the repository, to change the owner of the repository directory and all its contents to the user that Apache runs as (in my case, <code>www</code>).
<p>If you want to still be able to write directly to it (for instance, to set up the configuration) without sudo-ing, you can change the group permissions to allow a group that you&#8217;re a member of to write to it.  (Like I said, this is probably not the most secure way to do things, but it&#8217;s the easiest, and probably fine for something that&#8217;s carefully limited to your own machine.  I hate dealing with file permissions, so I set it up the lazy way.)</p>
<p>You can do all of this with OS X&#8217;s &#8220;Get Info&#8221;, or on the command line with <code>chown -R</code> and <code>chgrp -R</code></li>
<li>In your repository, find <code>conf/svnserve.conf</code>, and uncomment the following lines:
<p><code>anon-access = read<br />
auth-access = write<br />
password-db = passwd</code></li>
<li>Now open conf/passwd and add a line to the bottom with the format:
<p><code>username = password</code></p>
<p>subtituting, of course, the username and password that you want to use to access your repository.  You can add additional lines for additional users.</li>
<li>The SVNbook recommends creating <code>trunk</code>, <code>branches</code>, and <code>tags</code> subdirectories for each project in your repository, although this is by no means required.  I don&#8217;t ancipate doing a huge amount of branching, but I figured it couldn&#8217;t hurt.
<p>The easiest way to get this set up, if you have already started your project somewhere and can&#8217;t change its location without breaking things because of absolute path configurations, is as follows:</p>
<ol type="a">
<li>Create a <code>tmp</code> directory on your desktop.</li>
<li>Inside <code>tmp</code>, create a directory with the name of your project.  You&#8217;ll be happiest if this is short and doesn&#8217;t include any spaces.</li>
<li>Inside the project directory, create <code>trunk</code>, <code>branches</code>, and <code>tags</code> directories.</li>
<li><code>svn import . --username YOURUSERNAME --password YOURPASSWORD  http://localhost:81/svn -m "repository layout for PROJECTNAME"</code>, substituting the appropriate username, password, and projectname.  If you&#8217;re using a different URL for your repository, substitute that too, of course.</li>
</ol>
</li>
<li>You may want Subversion to ignore particular types of files.  For instance, with Django, I&#8217;m working with Python, which creates a compiled bytecode file for each script, with the extension <code>.pyc</code>.  These don&#8217;t need to be versioned because each one is recreated automatically from the script every time you change it and run it.
<p>Different languages and project types will have different files to ignore.  There are also OS metadata files like OS X&#8217;s <code>.DS_Store</code> and Windows&#8217; <code>Thumbs.db</code> that you probably don&#8217;t want to carry around either.</p>
<p>This is set up on the client side, and you&#8217;ll probably want to take care of it before importing or adding anything beyond that skeletal directory structure.</p>
<p>Open <code>~/.subversion/config</code>, and locate the <code>[miscellany]</code> section.  In there is a line, possibly commented out, that looks something like this:</p>
<p><code># global-ignores = *.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store</code></p>
<p>Uncomment the line if it&#8217;s commented out, and add <code>.DS_Store</code> (if it&#8217;s not already there) and <code>*.pyc</code> to the end, so it looks something like this:</p>
<p><code>global-ignores = *.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store *.pyc</code></p>
<p>While you&#8217;ve got the file open, you might want to scroll up to the <code>[helpers]</code> section, and uncomment the <code>editor-cmd</code> line, and set it to use your editor of choice.</li>
<li>OK, we need to import our project now.
<p>First, <code>cd</code> into the parent directory of your project directory, and check out the trunk of the project (since the trunk is empty, this will do nothing except create a <code>.svn</code> directory in the project directory, so subversion can handle it properly as a &#8220;working copy.):</p>
<p><code>svn checkout http://localhost:81/svn/PROJECTNAME/trunk PROJECTDIR</code></p>
<p>Then, <code>cd</code> into the project directory and tell Subversion to add everything from your project to the repository.  For each subdirectory of the project that you want under version control (Subversion will recursively add directory contents):</p>
<p><code>svn add SUBDIRNAME</code></p>
<p>Then add the files that live in the root in the project directory that you want versioned.  I had a couple files I wanted to ignore (such as my sqlite database), so I just added the Python scripts:</p>
<p><code>svn add *.pyc</code></p>
<p>Then commit everything:</p>
<p><code>svn commit -m "Adding initial project files"</code></p>
<p>And you&#8217;re done!
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://triopter.com/archive/subversion-on-os-x-part-2-your-first-project/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Six Steps to a Subversion Server on OS X with Darwinports</title>
		<link>http://triopter.com/archive/six-steps-to-a-subversion-server-on-os-x-with-darwinports/</link>
		<comments>http://triopter.com/archive/six-steps-to-a-subversion-server-on-os-x-with-darwinports/#comments</comments>
		<pubDate>Fri, 29 Dec 2006 06:32:32 +0000</pubDate>
		<dc:creator>Noemi Millman</dc:creator>
				<category><![CDATA[darwinports]]></category>
		<category><![CDATA[os x]]></category>
		<category><![CDATA[subversion]]></category>

		<guid isPermaLink="false">http://triopter.com/archive/six-steps-to-a-subversion-server-on-os-x-with-darwinports/</guid>
		<description><![CDATA[I&#8217;ve tried on at least three separate occasions to set up a CVS repository on my computer, but each time I&#8217;ve completely given up, mostly because getting the darn thing configured properly just seems to be beyond my abilities.
But besides that, CVS is really obsolete at this point, and Subversion has really taken over its [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve tried on at least three separate occasions to set up a CVS repository on my computer, but each time I&#8217;ve completely given up, mostly because getting the darn thing configured properly just seems to be beyond my abilities.</p>
<p>But besides that, CVS is really obsolete at this point, and Subversion has really taken over its status as the de facto standard for free, open-source revision control software.</p>
<p>Installation was yet another project that turned out to be super-easy with a little help from Darwinports.</p>
<p>Here&#8217;s the full set of steps to install:</p>
<ol>
<li>
<p><a href="http://triopter.com/archive/adventures-in-darwinports-installing-apache2-php5-mysql-41-postgresql-and-django/">Grab Apache 2 off Darwinports</a> and get it running separately from the default OS X Apache 1.3 installation (PHP, MySQL, et al entirely optional).  Darwinports&#8217; Apache automatically includes <code>mod_dav</code>, which you&#8217;ll need.</p>
</li>
<li>
<p>Install Subversion and Apache&#8217;s dav_svn_module:</p>
<p><code>sudo port install subversion +mod_dav_svn</code></p>
<p>Darwinports&#8217; Subversion conveniently includes both server and client.  Spiffy.</p>
</li>
<li>
<p>Decide where your repository is going to live.  I set up a directory under my user directory, with the full path <code>/Users/myusername/svn</code></p>
</li>
<li>
<p>Configure Apache to work with Subversion.  First, add the following to the bottom of the list of <code>LoadModule</code> directives in <code>httpd.conf:</code></p>
<p><code>LoadModule dav_svn_module     modules/mod_dav_svn.so</code></p>
<p>Then add the following to the end of <code>httpd.conf:</code></p>
<p><code>&lt;Location /svn &gt;# I think you can change "/svn" to whatever you want the path to be on your server.<br />
DAV svn<br />
SVNPath /Users/myusername/svn/ # Change this to the path you chose in Step 3, of course<br />
&lt;/Location&gt;</code></p>
<p>If you want to keep your repository private &#8212; i.e. only accessible from the machine it&#8217;s hosted on, you can add a few lines, like so:</p>
<p><code>&lt;Location /svn &gt;# I think you can change "/svn" to whatever you want the path to be on your server.<br />
DAV svn<br />
SVNPath /Users/myusername/svn/ # Change this to the path you chose in Step 3, of course</p>
<p>Order Deny,Allow<br />
Deny from all<br />
Allow from 127.0.0.1<br />
&lt;/Location&gt;</code></p>
</li>
<li>
<p>Create your repository:</p>
<p><code>svnadmin create --fs-type fsfs /Users/myusername/svn</code></p>
</li>
<li>
<p>Restart Apache</p>
</li>
</ol>
<p>Whee, that was easy.</p>
<p>Browse to <code>http://localhost:81/svn</code> (substitute the appropriate port, of course, if you configured Apache differently) &#8212; and if you get something that looks like a really simple webpage, you&#8217;re set.</p>
<p>I&#8217;m kind of in love with Darwinports right now, in case you haven&#8217;t noticed.  Next challenge: actually configuring a Subversion repository.  I&#8217;m seriously crossing my fingers that this is easier than CVS.</p>
]]></content:encoded>
			<wfw:commentRss>http://triopter.com/archive/six-steps-to-a-subversion-server-on-os-x-with-darwinports/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

