<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns="http://purl.org/rss/1.0/">
  <channel rdf:about="http://times.usefulinc.com/tagbzr">
    <title>Edd Dumbill's Weblog: 'bzr' articles</title>
    <description>Articles tagged as 'bzr' from Edd Dumbill, technology writer and free software hacker.</description>
    <link>http://times.usefulinc.com/tagbzr</link>
    <dc:date>2007-06-20T11:38:45Z</dc:date>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://times.usefulinc.com/2007/06/20-bzr"/>
        <rdf:li rdf:resource="http://times.usefulinc.com/2006/09/29-rails-bzr"/>
      </rdf:Seq>
    </items>
  </channel>
  <item rdf:about="http://times.usefulinc.com/2007/06/20-bzr">
    <title>Why Bazaar rocks, and the highs and lows of its use with Rails</title>
    <link>http://times.usefulinc.com/2007/06/20-bzr</link>
    <description>Mark Shuttleworth writes about the importance of merging in version control systems.</description>
    <dc:subject>programming</dc:subject>
    <dc:subject>rails</dc:subject>
    <dc:subject>agile</dc:subject>
    <dc:subject>bzr</dc:subject>
    <dc:creator>Edd Dumbill</dc:creator>
    <dc:date>2007-06-20T11:04:52Z</dc:date>
    <foaf:maker>
      <foaf:Person>
        <foaf:mbox rdf:resource="mailto:edd@usefulinc.com"/>
      </foaf:Person>
    </foaf:maker>
    <content:encoded>&lt;p&gt;While &lt;a href="http://subversion.tigris.org/"&gt;Subversion&lt;/a&gt; is for many the source code revision system of choice, I've never stopped long with it myself. Why? Because it's mostly a fixed-up &lt;a href="http://www.nongnu.org/cvs/"&gt;CVS&lt;/a&gt;, and doesn't fix the really gnarly problem with revision control: merging.&lt;/p&gt;&lt;p&gt;Mark Shuttleworth has written an &lt;a href="http://www.markshuttleworth.com/archives/126"&gt;insightful little article&lt;/a&gt; on the key aspects of merging source code. Some of the points he makes underpin my choice of revision control system.&lt;/p&gt;&lt;p&gt;For several years now I've been a very contented user of &lt;a href="http://bazaar-vcs.org/"&gt;Bazaar&lt;/a&gt;, in its &lt;a href="http://bazaar-vcs.org/Baz1x"&gt;first arch-based incarnation&lt;/a&gt;, and now in its latter form. The key reason has been ease of merging.&lt;/p&gt;&lt;p&gt;While most articles praising Bazaar are reports of open source development, I've also found it very handy for small in-house teams working on web applications.&lt;/p&gt;&lt;p&gt;There are very often multiple arcs of development going on at once, and the ease of merging makes it easy to ensure that long-running development arcs don't get ridiculously far from the main trunk of development. Bazaar's merging also makes it easier for lead developers to police the merging of the code base.&lt;/p&gt;&lt;h3&gt;Using Bazaar with Rails and other tools&lt;/h3&gt;&lt;p&gt;Working mostly with Rails, one repeatedly runs up against the assumption that Subversion is the golden path for revision control. This is perhaps a little telling about the level of participation most Rails-based projects have reached.&lt;/p&gt;&lt;p&gt;The tools story for a Bazaar user is both good and bad.&lt;/p&gt;&lt;h4&gt;The good&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Deployment&lt;/strong&gt;: the &lt;a href="http://www.capify.org/"&gt;Capistrano&lt;/a&gt; deployment system has support for Bazaar. I've written previously about &lt;a href="http://times.usefulinc.com/2006/09/29-rails-bzr"&gt;the technique I use to deploy my Rails apps&lt;/a&gt;.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Collaboration&lt;/strong&gt;: &lt;a href="http://trac.edgewall.org/"&gt;Trac&lt;/a&gt; is a wonderful integrated bug database, wiki and source code browser. Although it's a little hard to find, the &lt;a href="http://bazaar-vcs.org/TracBzr"&gt;trac-bzr integration&lt;/a&gt; works very well, and happily moves Trac out of the Subversion-based assumption that you can only have one repository root per project.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h4&gt;The bad&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Continuous integration&lt;/strong&gt;: with &lt;a href="http://www.expectnation.com/"&gt;Expectnation&lt;/a&gt;, we've had to roll our own continuous integration system ('system' being rather a grand word for a shell script on a cronjob...) Most of the CI systems currently popular seem to assume Subversion.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Editor/IDE integration&lt;/strong&gt;: &lt;a href="http://bazaar-vcs.org/3rdPartyTools"&gt;some early work exists&lt;/a&gt;, but it's early days. I've not yet found anything making me want to leave the command line.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;a href="http://times.usefulinc.com/2007/06/20-bzr#disqus_thread"&gt;Join the conversation about this post&lt;/a&gt;&lt;/p&gt;</content:encoded>
  </item>
  <item rdf:about="http://times.usefulinc.com/2006/09/29-rails-bzr">
    <title>A deployment pattern for Rails and bzr</title>
    <link>http://times.usefulinc.com/2006/09/29-rails-bzr</link>
    <description>An explanation of the way I use Rails and bzr for efficient deployment.</description>
    <dc:subject>rails</dc:subject>
    <dc:subject>bzr</dc:subject>
    <dc:creator>Edd Dumbill</dc:creator>
    <dc:date>2006-09-29T13:50:19Z</dc:date>
    <foaf:maker>
      <foaf:Person>
        <foaf:mbox rdf:resource="mailto:edd@usefulinc.com"/>
      </foaf:Person>
    </foaf:maker>
    <content:encoded>  &lt;p&gt;I can't get enough of the &lt;a href="http://bazaar-vcs.org/"&gt;bzr&lt;/a&gt; revision control system, and I'm quite fond of Rails too. So, I thought I'd share my deployment setup for Rails applications using &lt;a href="http://manuals.rubyonrails.com/read/book/17"&gt;Capistrano&lt;/a&gt; and bzr. &lt;/p&gt;     &lt;p&gt; Capistrano works on the assumption that you're deploying from a revision control system. Secondly, it requires that your deployment server is aware of how to access this system. This leaves you with various options, the most obvious of which are: &lt;/p&gt;     &lt;ol&gt;    &lt;li&gt;Host your source repository on your deployment server&lt;/li&gt;      &lt;li&gt;Have your deployment server equipped with remote access to your source repository&lt;/li&gt;      &lt;li&gt;Mirror your repository to your deployment server&lt;/li&gt;    &lt;/ol&gt;    &lt;p&gt; Of these, option 1 is out for all but somewhat casual projects, option 2 either opens up your source repository more than I like, or needs fiddly tunnelling of SSH which I don't think Capistrano is up to yet (I only like to use key-based access with SSH, rather than password based access, which seems at the moment complicate life where Capistrano is concerned.) &lt;/p&gt;     &lt;p&gt; I've opted for option 3. The pattern I use is this. On setting up the deployment server, I push a copy of the bzr repository to a private directory. Then, on deployment I first update that repository securely from the master repository inside my network, then export the new release locally on the server. &lt;/p&gt;     &lt;p&gt; Here are the relevant bits of my Capistrano configuration: &lt;/p&gt;     &lt;pre&gt;set :repository, &amp;quot;/opt/repo_mirror/#{application}&amp;quot;&lt;br /&gt;&lt;br /&gt;&amp;hellip;&lt;br /&gt;&lt;br /&gt;set :scm, :bzr&lt;br /&gt;set :checkout, &amp;quot;branch&amp;quot;&lt;br /&gt;&lt;br /&gt;&amp;hellip;&lt;br /&gt;&lt;br /&gt;task :before_update_code do&lt;br /&gt;  `bzr push sftp://deploy.example.org/opt/repo_mirror/#{application}`&lt;br /&gt;end&lt;/pre&gt;    &lt;p&gt;One big advantage of this over option 2, a remote source repository, is that only the changes are sent up to the server, and the bandwidth-intensive application checkout happens locally on the deployment machine.&lt;/p&gt;      &lt;p&gt;The final bit of improvement this could stand is to have the bzr checkout use export and not branch, but I think I'll have to alter the Capistrano's bzr plugin in order to do this.&lt;/p&gt;   &lt;p&gt;&lt;a href="http://times.usefulinc.com/2006/09/29-rails-bzr#disqus_thread"&gt;Join the conversation about this post&lt;/a&gt;&lt;/p&gt;</content:encoded>
  </item>
</rdf:RDF>
