]> source.dussan.org Git - redmine.git/commitdiff
Accept any svn tunnel scheme in repository URL (#3278).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 10 May 2009 10:08:02 +0000 (10:08 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 10 May 2009 10:08:02 +0000 (10:08 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2723 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/helpers/repositories_helper.rb
app/models/repository/subversion.rb

index 3555895bc609cda4076d7c5da17b5bad1bfd52b2..0e0f94c79f8ce3b1455c4d5e337ebfc487d92f18 100644 (file)
@@ -147,7 +147,7 @@ module RepositoriesHelper
 
   def subversion_field_tags(form, repository)
       content_tag('p', form.text_field(:url, :size => 60, :required => true, :disabled => (repository && !repository.root_url.blank?)) +
-                       '<br />(http://, https://, svn://, file:///)') +
+                       '<br />(file:///, http://, https://, svn://, svn+[tunnelscheme]://)') +
       content_tag('p', form.text_field(:login, :size => 30)) +
       content_tag('p', form.password_field(:password, :size => 30, :name => 'ignore',
                                            :value => ((repository.new_record? || repository.password.blank?) ? '' : ('x'*15)),
index 98d05e610e34fd7c96ab9cfeb555a63890e78016..fdda488d185480fa89b7c816e6b6784cdef9aca7 100644 (file)
@@ -20,7 +20,7 @@ require 'redmine/scm/adapters/subversion_adapter'
 class Repository::Subversion < Repository
   attr_protected :root_url
   validates_presence_of :url
-  validates_format_of :url, :with => /^(http|https|svn|svn\+ssh|file):\/\/.+/i
+  validates_format_of :url, :with => /^(http|https|svn(\+[^\s:\/\\]+)?|file):\/\/.+/i
 
   def scm_adapter
     Redmine::Scm::Adapters::SubversionAdapter