I am happy that I have worked enough with the svn to see its drawbacks.

One of the drawbacks is the speeds of commits.

The second one is that my repository starts to break often. here is how I repair it when this happends:

svnadmin repair /var/lib/subversion/public/payak

then don’t forget to change the rights

chown -R  www-data:www-data /var/lib/subversion/public/payak/

Switching and merging with HEAD from some branch

Create branch:

svn copy https://svn.spider.bg/public/payak/system3/trunk \
         https://svn.spider.bg/public/payak/system3/date_sorting/ \
         -m "Creating stable branch for the date sorting."
Delete branch:
svn delete https://svn.spider.bg/public/payak/system3/BRANCHES/new_solr/ -m "get rid of the new_solr branch"

svn switch https://svn.spider.bg/public/payak/system3/trunk .

svn switch https://svn.spider.bg/public/payak/system3/BRANCHES/new_solr/ .

svn merge https://svn.spider.bg/public/payak/system3/trunk https://svn.spider.bg/public/payak/system3/BRANCHES/new_solr

svn ci -m “Merge new solr branch with trunk”

Capistrano and Branches/Tags

I have found this snipplet for capistrano, in my case it is little bit changed so here it is:

cat config/deploy/staging.rb
set :application, "system3"
set :repository, "https://svn.spider.bg/public/payak/#{application}"

set :latest_tag, "trunk"
namespace :deploy do

  desc "Asks the user for the tag to deploy"
  task :before_update_code do
    set :tag, Proc.new { CLI.ui.ask "Branch to deploy (relative to #{repository}) or just hit enter to deploy latest: "}
    set :tag, "#{latest_tag}" if "#{tag}".strip.empty?
    set :repository, "#{repository}/#{tag}"
  end
end

Ignoring rails files/folders

svn propset svn:ignore "*.log" log/

svn propset svn:ignore "*" tmp/

svn propset svn:ignore "*" public/photos public/services