Forum: Ruby on Rails Switchtower different svn repo urls from my local box and my

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
85ab83078200dcd84ea993bdcda957b3?d=identicon&s=25 Edgar Gonzalez (Guest)
on 2006-01-28 17:18
(Received via mailing list)
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/"
3. 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: edgargonzalez@gmail.com
http://lacaraoscura.com
992fe8c19bbbc27f2b562a9f96efc03d?d=identicon&s=25 Jamis Buck (Guest)
on 2006-01-29 03:56
(Received via mailing list)
On Jan 28, 2006, at 10:16 AM, Edgar Gonzalez 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
This topic is locked and can not be replied to.