<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/stylesheets/rss.css" type="text/css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Isshen, LLC: Tag gentoo</title>
    <link>http://blog.isshen.com/articles/tag/gentoo</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description></description>
    <item>
      <title>Subversion 1.4.4 upgrade</title>
      <description>&lt;p&gt;Adam had recently got a MacBookPro. We no longer have to mess with InstantRails on Windows. It also means he can use native Subversion and SVK. However, &lt;a href="http://homepage.mac.com/hiirem/svkbuilds.html"&gt;the OSX-native package&lt;/a&gt; uses Subversion 1.4. Our servers uses Subversion 1.3.x. To be fully compatible, that would mean compiling a custom copy of Subversion 1.3.&lt;/p&gt;

&lt;p&gt;After reading about the &lt;a href="http://subversion.tigris.org/svn_1.4_releasenotes.html"&gt;feature additions for Subversion 1.4&lt;/a&gt;, I decided it would be much easier for me to upgrade the server and my dev laptop to 1.4. Gentoo masks 1.4.4, but most Subversion upgrades are fairly transparent. There are two main benefits from the upgrade I wanted. Subversion 1.4 claims to be better at storing and transmitting binary data. We version a lot of raw data, so this would work out well. Subversion 1.4 also has a &lt;tt&gt;svnsync&lt;/tt&gt; command that works like SVK's svn mirroring. It lets you move or clone a repository. Maybe Linus Torvald's &lt;a href="http://codicesoftware.blogspot.com/2007/05/linus-torvalds-on-git-and-scm.html"&gt;acerbic comments about Subversion&lt;/a&gt; has been getting noticed.&lt;/p&gt;



&lt;p&gt;Upgrading to Subversion 1.4 on Gentoo is a piece of cake. You add:&lt;/p&gt;

&lt;blockquote&gt; &lt;tt&gt;echo "=dev-util/subversion-1.4.4-r3" &gt;&gt; /etc/portage/package.keywords&lt;/tt&gt;
&lt;/blockquote&gt;

&lt;p&gt;and then &lt;/p&gt;

&lt;blockquote&gt; &lt;tt&gt;emerge =dev-util/subversion-1.4.4-r3&lt;/tt&gt;&lt;/blockquote&gt;

&lt;p&gt;You can run &lt;tt&gt;revdep-rebuild&lt;/tt&gt; to make sure all the library references are working, but I found that this was not necessary, even with the SVK installed. (With the &lt;tt&gt;perl&lt;/tt&gt; use-flag set on Subversion, all the Perl bindings gets automatically updated on the system.)&lt;/p&gt;

&lt;p&gt;To take advantage of the more-efficient binary storage, all the repositories needed to be upgraded. I shut down Apache to prevent anyone from making commits, backed up my repository, and moved the repository to a different directory while I setup the new repository directories. I then wrote two quick-and-dirty shell scripts to do this:&lt;/p&gt;

&lt;blockquote&gt;&lt;tt&gt;#!/bin/sh&lt;br/&gt;
&lt;br/&gt;
mkdir tmp_dumps&lt;br/&gt;
for repo in `ls repos-1.3.x`; do&lt;br/&gt; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;svnadmin dump repos-1.3.x/${repo} &gt; tmp_dumps/${i}&lt;br/&gt;
done&lt;br/&gt;&lt;/tt&gt;&lt;/blockquote&gt;

&lt;p&gt;and&lt;/p&gt;

&lt;blockquote&gt;&lt;tt&gt;
#!/bin/sh&lt;br/&gt; 
&lt;br/&gt;
for repo in `ls tmp_dumps`; do&lt;br/&gt; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;svnadmin create --fs-type fsfs repos/${repo}&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;svnadmin load repos/${repo} &lt; tmp_dumps/${repo}&lt;br/&gt;
done&lt;br/&gt;
&lt;/tt&gt;&lt;/blockquote&gt;

&lt;p&gt;Note the &lt;tt&gt;--fs-type fsfs&lt;/tt&gt; flag. You will have to change that if you are using the BerkeleyDB storage engine. These two scripts essentially creates a dump of all the repositories found in &lt;tt&gt;repos&lt;/tt&gt; directory, then reloads them. During the reload, Subversion 1.4's &lt;tt&gt;svnadmin create&lt;/tt&gt; command creates a new repository. The newly reloaded repository uses the more efficient binary storage scheme.&lt;/p&gt;

&lt;p&gt;Lastly, I upgraded all of my local working copies. Subversion does this transparently, but I have a number of large repositories I use often. A simple &lt;tt&gt;svn update&lt;/tt&gt; on each of the working copies upgrades the working copy to 1.4. Some of them take ten minutes to upgrade -- I do this now so I don't have to wait, later on.&lt;/p&gt;

&lt;p&gt;Ho-Sheng Hsiao&lt;br/&gt;
Isshen, LLC&lt;/p&gt;</description>
      <pubDate>Sat, 25 Aug 2007 20:23:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:6ea27de3-32c5-4587-9d3b-71f65c690f0c</guid>
      <author>Hosh</author>
      <link>http://blog.isshen.com/articles/2007/08/25/subversion-1-4-4-upgrade</link>
      <category>Subversion/SVK</category>
      <category>svn</category>
      <category>svk</category>
      <category>gentoo</category>
      <category>tools</category>
    </item>
  </channel>
</rss>
