<?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>Jason Antman's Blog &#187; version control</title> <atom:link href="http://blog.jasonantman.com/tags/version-control/feed/" rel="self" type="application/rss+xml" /><link>http://blog.jasonantman.com</link> <description>A general-purpose dump of my thoughts, tips, tricks, and observations on a wide variety of topics - Linux, Free Software, the Internet, IT, EMS, software development, systems administration, and the state of the world.</description> <lastBuildDate>Thu, 01 Jul 2010 15:17:33 +0000</lastBuildDate> <generator>http://wordpress.org/</generator> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>Subversion &#8216;is missing or not locked&#8217; error</title><link>http://blog.jasonantman.com/2010/01/subversion-is-missing-or-not-locked-error/</link> <comments>http://blog.jasonantman.com/2010/01/subversion-is-missing-or-not-locked-error/#comments</comments> <pubDate>Fri, 29 Jan 2010 20:58:42 +0000</pubDate> <dc:creator>Jason Antman</dc:creator> <category><![CDATA[Tech HowTos]]></category> <category><![CDATA[subversion]]></category> <category><![CDATA[svn]]></category> <category><![CDATA[version control]]></category><guid isPermaLink="false">http://blog.jasonantman.com/?p=538</guid> <description><![CDATA[What the subversion file 'is missing or not locked' error means and how to get rid of it.<div class="ezAdsense adsense adsense-leadout" style="text-align:center;margin:12px;"><script type="text/javascript">google_ad_client="pub-6049167767809021";google_ad_slot="8888378867";google_ad_width=336;google_ad_height=280;</script> <script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div>]]></description> <content:encoded><![CDATA[<p>Recently I was doing some work on a few PHP scripts, and came by a rather annoying error while trying to commit to subversion:</p><div class="wp_syntax"><div class="code"><pre class="none" style="font-family:monospace;">svn: Commit failed (details follow):
svn: Working copy '/srv/www/htdocs/newcall/stats/generated' is missing or not locked</pre></div></div><p>The problem was a directory, &#8220;generated&#8221;. This particular app makes use of <a href="http://naku.dohcrew.com/libchart" onclick="pageTracker._trackPageview('/outgoing/naku.dohcrew.com/libchart?referer=');">libchart</a> to draw simple charts in PHP. Libchart writes the charts to files, and therefore needs a directory writable by the Apache user. So, I created the <code>generated/</code> directory for these output files, and <code>chown</code>ed <code>wwwrun:www</code>. Now, apparently, the subversion <code>svn add</code> command doesn&#8217;t check ownership/writable permissions before adding a directory. So, it added <code>generated/</code> to the main list of files, but couldn&#8217;t write the <code>.svn</code> directory and add a lock. IMHO, this is an error in the svn client.</p><p>I couldn&#8217;t find any solutions to the problem online. Essentially, I have an empty directory (or at least nothing useful in it) that got partially added to svn &#8211; it was added to the <code>.svn/entries</code> file in the parent directory, but never had its own <code>.svn</code> directory created.</p><p>The only solution that I found is to manually edit the <code>.svn/entries</code> file in the parent directory. <strong>WARNING:</strong> this isn&#8217;t for the faint of heart. Be sure you don&#8217;t screw anything up.</p><ol><li>Open the <code>.svn/entries</code> file in the parent directory in a text editor (i.e. if the problem directory is <code>stats/generated</code>, edit <code>stats/.svn/entries</code></li><li>Find the <code>entry</code> node with the correct &#8220;name&#8221; attribute for the directory in question. For stats/generated, in the <code>stats/.svn/entries</code> file, it should look like:<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;entry</span></span>
<span style="color: #009900;">   <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;generated&quot;</span></span>
<span style="color: #009900;">   <span style="color: #000066;">kind</span>=<span style="color: #ff0000;">&quot;dir&quot;</span></span>
<span style="color: #009900;">   <span style="color: #000066;">schedule</span>=<span style="color: #ff0000;">&quot;add&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span></pre></div></div></li><li>Make the entries file writable (<code>chmod u+w entries</code>)</li><li>Remove the entry from the file.</li><li>Set the entries file back to non-writable (<code>chmod u-w entries</code>)</li><li>Remove any save files if they were created (i.e. <code>entries~</code> for emacs)</li><li>Remove the directory itself and re-create it, this time adding to svn before setting the ownership.</li><li>Commit. It should now work.</li></ol><div class="ezAdsense adsense adsense-leadout" style="text-align:center;margin:12px;"><script type="text/javascript">google_ad_client="pub-6049167767809021";google_ad_slot="8888378867";google_ad_width=336;google_ad_height=280;</script> <script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div>]]></content:encoded> <wfw:commentRss>http://blog.jasonantman.com/2010/01/subversion-is-missing-or-not-locked-error/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- This site's performance optimized by W3 Total Cache. Dramatically improve the speed and reliability of your blog!

Learn more about our WordPress Plugins: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced) (user agent is rejected)
Database Caching 6/11 queries in 0.011 seconds using disk

Served from: mpac.midlandparkambulance.com @ 2010-07-30 09:48:51 -->