Switchtower different svn repo urls from my local box and my

I got problems running switchtower 0.10.0 when I try to run “rake
deploy”
from my local box (windows) to my shared hosting

If I set the repository to (deploy.rb):
set :repository, “file:///home/[my_user]/repo/[my_app]/trunk”

My local box (windows) can’t reach the subversion repository located in
site5

If I set the repository to:

set :repository,
“svn+ssh://[my_user]@[my_site]/home/[my_user]/repo/[my_app]/trunk/”

I got a “permission denied” when svn run in my shared hosting

How do you deal with this?

The workaround I found was:

  1. Leave the :repository property in deploy.rb to file:// syntax.
    set :repository, “file:///home/[my_user]/repo/[my_app]/trunk”
    2.Define a new property :repository_from_dev in deploy.rb to svn+ssh://
    syntax
    set :repository_from_dev,
    “svn+ssh://[my_user]@[my_site]/home/[my_user]/repo/[my_app]/trunk/”
  2. Modify the lib/tasks/switchtower.rake file in order to change the
    switchtower behavior, adding this line:

=======================================================

Extension to deploy to site5

=======================================================

require ‘switchtower/scm/subversion’

module SwitchTower
module SCM
class Subversion
def latest_revision
configuration.logger.debug “querying latest revision…” unless
@latest_revision
#repo = configuration.repository
repo = configuration.repository_from_dev
puts “usando repository_from_dev: #{repo}”
until @latest_revision
match = svn_log(repo).scan(/r(\d+)/).first
@latest_revision = match ? match.first : nil
if @latest_revision.nil?
# if a revision number was not reported, move up a level in
the
path
# and try again.
repo = File.dirname(repo)
end
end
@latest_revision
end
end
end
end

Now “rake deploy” works fine

Any suggestions? maybe another approach?
Thx in advanced


Edgar González González
E-mail: [email protected]
http://lacaraoscura.com

On Jan 28, 2006, at 10:16 AM, Edgar G. wrote:

set :repository, “svn+ssh://[my_user]@[my_site]/home/[my_user]/repo/
[my_app]/trunk/”

I got a “permission denied” when svn run in my shared hosting

Very odd! I don’t understand why you’d get the permission denied,
especially given your workaround, below. Feel free to email me off-
list and we can try and troubleshoot it a bit.

  • Jamis