diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-05-10 10:08:02 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-05-10 10:08:02 +0000 |
commit | 752e263d3a4272253d11698bccc577ae0683b0b6 (patch) | |
tree | db208fdb6f8931b76ad9012d160523f5d0e16fe7 /app | |
parent | a7ea14f5af751da346f411d4df765629e56e260c (diff) | |
download | redmine-752e263d3a4272253d11698bccc577ae0683b0b6.tar.gz redmine-752e263d3a4272253d11698bccc577ae0683b0b6.zip |
Accept any svn tunnel scheme in repository URL (#3278).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2723 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/repositories_helper.rb | 2 | ||||
-rw-r--r-- | app/models/repository/subversion.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/helpers/repositories_helper.rb b/app/helpers/repositories_helper.rb index 3555895bc..0e0f94c79 100644 --- a/app/helpers/repositories_helper.rb +++ b/app/helpers/repositories_helper.rb @@ -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)), diff --git a/app/models/repository/subversion.rb b/app/models/repository/subversion.rb index 98d05e610..fdda488d1 100644 --- a/app/models/repository/subversion.rb +++ b/app/models/repository/subversion.rb @@ -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 |