This post originated from an RSS feed registered with Ruby Buzz
by Jonathan Weiss.
Original Post: Remote cache pitfalls
Feed Title: BlogFish
Feed URL: http://blog.innerewut.de/feed/atom.xml
Feed Description: Weblog by Jonathan Weiss about Unix, BSD, security, Programming in Ruby, Ruby on Rails and Agile Development.
Just a small note for people using Capistrano/Webistrano and the remote_cache deployment strategy.
set :deploy_via, :remote_cache
The remote_cache strategy creates a cached-copy directory in your #{deploy_to}/shared base. It then checks out the coe once and in contrast to the default deployment strategy. After the initial checkout subsequent deployments will do a `svn up` and copy the result over to #{deplot_to}/releases/.
Using remote_cache your deployments are usually a bit faster but there is a catch. If you ever change the repository variable, e.g. because you switch to another tag of move the stable branch, your deployments will either fail or do not completely update.
This is due to the fact, that the new deployment does a
$ svn up -rYOUR_REV http://svn.example.com/svn/branches/my_new_branch
on the cached copy. With a different branch or tag than the one the `svn checkout` command was executed with, this will not work. In order to fix it, just delete the cached-copy directory. It will be re-created on the next deployment.