<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.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>Wolfmans Howlings: Updated Capistrano local subversion and perforce</title>
    <link>http://blog.wolfman.com/articles/2007/02/18/updated-capistrano-local-subversion-and-perforce</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>A programmers Blog about Ruby, Rails and a few other issues</description>
    <item>
      <title>Updated Capistrano local subversion and perforce</title>
      <description>&lt;p&gt;I have updated the Capistrano local subversion module and added a perforce one.&lt;/p&gt;

&lt;p&gt;The original article is &lt;a href="http://blog.wolfman.com/articles/2006/12/06/a-capistrano-scm-module-for-local-svn-access"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I have added rsync as an option to speed up
the deployment to remote servers, To use that option install this
&lt;a href="http://blog.wolfman.com/files/local_subversion_with_rsync_3.tar.gz"&gt;version&lt;/a&gt;,
in the example below I have installed the file into my rails projects
lib/tasks directory.&lt;/p&gt;

&lt;p&gt;When the rsync option is set the deployment method will use rsync over
ssh to synchronize between a local cache of the subversion project and
a remote cache, minimizing the amount of data uploaded to the server.&lt;/p&gt;

&lt;p&gt;To use rsync use this in the deploy.rb...&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;  require 'lib/tasks/local_subversion_rsync.rb'
  set :scm, Capistrano::SCM::LocalSubversionRsync

  set :repository_is_not_reachable_from_remote, true
  set :use_rsync, true
  set :local_rsync_cache, "/home/user/projects/aproject/cache"
  set :remote_rsync_cache, "/var/www/webapp/cache"

  set :rsync_username, "ausername"
  set :rsync_excludes, ["*.bak", "*.log"]
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The &lt;code&gt;rsync_username&lt;/code&gt; and &lt;code&gt;rsync_excludes&lt;/code&gt; are optional. &lt;/p&gt;

&lt;p&gt;The &lt;code&gt;:rsync_username&lt;/code&gt; option sets the username that ssh uses to login
to use rsync. Leave it blank if it is the same as your current login
name.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;:rsync_excludes&lt;/code&gt; option allows you to pass &lt;code&gt;--exclude&lt;/code&gt; options to
rsync, using the rsync syntax for exclusions, this is an array of
patterns to exclude.&lt;/p&gt;

&lt;p&gt;Note you must do a local SVN checkout to the directory specified by
&lt;code&gt;local_rsync_cache&lt;/code&gt; at least once before using this method.&lt;/p&gt;

&lt;p&gt;Also the directory specified by &lt;code&gt;remote_rsync_cache&lt;/code&gt; must exist on the server.&lt;/p&gt;

&lt;p&gt;The perforce version of the scm module that allows the perforce server
to be accessed locally only is
&lt;a href="http://blog.wolfman.com/files/local_perforce.rb"&gt;here&lt;/a&gt;, 
note that this does not currently support the rsync option
or write to the revisions.log.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://technorati.com/tag/capistrano+subversion" rel="tag"&gt;&lt;/a&gt;
&lt;a href="http://technorati.com/tag/capistrano+perforce" rel="tag"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Please note that with the imminent release of cap2, this issue is deprecated, thanks Jamis ;) http://www.capify.org&lt;/p&gt;</description>
      <pubDate>Sun, 18 Feb 2007 15:32:00 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:b03e448f-35df-4511-9ac3-e03edb9888f0</guid>
      <author>Jim Morris</author>
      <link>http://blog.wolfman.com/articles/2007/02/18/updated-capistrano-local-subversion-and-perforce</link>
      <category>Rails</category>
      <category>capistrano</category>
      <trackback:ping>http://blog.wolfman.com/articles/trackback/121</trackback:ping>
    </item>
    <item>
      <title>"Updated Capistrano local subversion and perforce" by wolfmanjm</title>
      <description>&lt;p&gt;I have released a new version that fixes the bug where the revisions.log file was not being updated&lt;/p&gt;</description>
      <pubDate>Wed, 21 Feb 2007 14:08:18 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:edf20bfc-1476-4616-a783-9c6c290acb38</guid>
      <link>http://blog.wolfman.com/articles/2007/02/18/updated-capistrano-local-subversion-and-perforce#comment-67</link>
    </item>
  </channel>
</rss>
