<?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>Acumen Development &#187; Development Processes</title>
	<atom:link href="http://www.acumendevelopment.net/category/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.acumendevelopment.net</link>
	<description>Software to inspire.</description>
	<lastBuildDate>Wed, 02 Jun 2010 16:39:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0-alpha</generator>
		<item>
		<title>Working with Corrupt Subversion Repositories</title>
		<link>http://www.acumendevelopment.net/working-with-poorly-subversion/</link>
		<comments>http://www.acumendevelopment.net/working-with-poorly-subversion/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 17:34:40 +0000</pubDate>
		<dc:creator>Leo Brown</dc:creator>
				<category><![CDATA[Development Processes]]></category>

		<guid isPermaLink="false">http://www.acumendevelopment.net/?p=317</guid>
		<description><![CDATA[Subversion is a great piece of version control software, and has been at the core of all our development projects for many years. Sadly, there are a few weaknesses. Key among them is lack of obliterate support, but one that&#8217;s stung us a few times now is corrupt SVN databases.
Here&#8217;s a quick runthrough of the [...]]]></description>
			<content:encoded><![CDATA[<p>Subversion is a great piece of version control software, and has been at the core of all our development projects for many years. Sadly, there are a few weaknesses. Key among them is lack of <a href="http://subversion.tigris.org/issues/show_bug.cgi?id=516">obliterate</a> support, but one that&#8217;s stung us a few times now is corrupt SVN databases.</p>
<p>Here&#8217;s a quick runthrough of the solution I developed to the common &#8216;bad transaction&#8217; issue, that causes your repository to stop checking out/modifying certain files (typically blobs).</p>
<p>1. Use svnadmin verify to find your bad revision (in this example, 195)</p>
<pre class="brush: php;">
svn verify myrepo
* Verified revision 0.
...
* Verified revision 194.
svnadmin: Malformed representation header
</pre>
<p>2. Dump the first working section of the repository to a dumpfile, then dump the second section as an incremental dump onto the end of this dumpfile</p>
<pre class="brush: php;">
svnadmin dump myrepo -r0:194 &gt; my.dmp
svnadmin dump myrepo --incremental -r196:HEAD &gt;&gt; my.dmp
</pre>
<p>3. Try to rebuild this repository by creating a new repository, and using svnadmin load to read in the newly created dumpfile.</p>
<pre class="brush: php;">
svnadmin create newrepo
cat my_filtered.dmp | svnadmin load newrepo
</pre>
<p>4. It&#8217;s likely that paths can not be rebuilt, and you will see errors describing this. Use svndumpfilter to exclude the problematic paths, creating a new dumpfile for each exclusion, and repeating from step 3.</p>
<pre class="brush: php;">
cat my.dmp | svndumpfilter exclude &quot;My/Bad/Path&quot; &gt; my_filtered.dmp
Excluding prefixes:
   '/My/Bad/Path'

Revision 0 committed as 0. (etc)
</pre>
<p>5. Replace the rebuilt repository&#8217;s UUID with that of the old repository, by using svnlook uuid and svnadmin setuuid.</p>
<pre class="brush: php;">
svnadmin setuuid newrepo `svnlook uuid myrepo`
</pre>
<p>6. Use svn switch to attempt to move a checked out copy to your new repository.</p>
<pre class="brush: php;">
svn --relocate switch http://host/myrepo http://host/newrepo .
</pre>
<p>7. If all goes to plan, replace your corrupt repository with your rebuild, and svn switch any working copies back to their original path. Then copy back in the data that you lost in the exclusion process, commit and get on with your work.</p>
<p>There you go, loads of messing around to get back to square one. Once that&#8217;s done, stop using FSFS as your SVN backend, as it&#8217;s much more buggy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.acumendevelopment.net/working-with-poorly-subversion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Basic Scraping</title>
		<link>http://www.acumendevelopment.net/basic-scraping/</link>
		<comments>http://www.acumendevelopment.net/basic-scraping/#comments</comments>
		<pubDate>Sat, 22 Nov 2008 16:57:59 +0000</pubDate>
		<dc:creator>Leo Brown</dc:creator>
				<category><![CDATA[Development Processes]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[mashups]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[scraping]]></category>

		<guid isPermaLink="false">http://www.acumendevelopment.net/?p=75</guid>
		<description><![CDATA[A short introduction to Web Page Scraping]]></description>
			<content:encoded><![CDATA[<p>While in production applications we all favour use of an API, there are a lot of situations, such as in &lsquo;<a href="http://en.wikipedia.org/wiki/Mashup_(web_application_hybrid)">Mashups</a>&rsquo; (I love how that term has been reappropriated from Jungle music) where you need to do some page scraping.</p>
<p>It&#8217;s occurred to me how these very easy techniques seem inaccessible to many people, so I thought I&#8217;d post a few bits and bobs about some basic scraping methods.</p>
<p>Here&#8217;s a bit of code I wrote to use PHP&#8217;s <a href="http://php.net/domdocument">DOMDocument class</a> to treat a HTML page as XML and fetch, in this case, the incredibly useful current world population&#8230; fantastic!</p>
<pre class="brush: php;">
&lt;?php
 // where to find population data...
 $location['url']='http://www.census.gov/ipc/www/popclockworld.html';
 $location['id']='worldnumber';

 // initialise a new document and prepare the data
 $d=new DOMDocument();
 $file = file_get_contents($location['url']);

 // get and print current world population
 $d-&gt;loadHTML($file);
 $e=$d-&gt;getElementById($location['id']);
 print $e-&gt;nodeValue;
?&gt;
</pre>
<p>Sample output: 6,738,610,278</p>
]]></content:encoded>
			<wfw:commentRss>http://www.acumendevelopment.net/basic-scraping/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using memcached

Served from: www.acumendevelopment.net @ 2010-09-10 02:01:26 -->