summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-12-06 17:40:54 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-12-06 17:40:54 +0000
commit472ec31662f82f59750d07c2cde7d5dc60206130 (patch)
tree0eef7227654a83ef60cf35c3c1a125d1c30f13bc /lib
parente66945cbd86343e48002fc646350f7d64c93d276 (diff)
downloadredmine-472ec31662f82f59750d07c2cde7d5dc60206130.tar.gz
redmine-472ec31662f82f59750d07c2cde7d5dc60206130.zip
Fixed: CVS connexion string may not contain @.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2096 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r--lib/redmine/scm/adapters/cvs_adapter.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/redmine/scm/adapters/cvs_adapter.rb b/lib/redmine/scm/adapters/cvs_adapter.rb
index 089a6b153..77a300b60 100644
--- a/lib/redmine/scm/adapters/cvs_adapter.rb
+++ b/lib/redmine/scm/adapters/cvs_adapter.rb
@@ -133,8 +133,7 @@ module Redmine
if state=="entry_start"
branch_map=Hash.new
- # gsub(/^:.*@[^:]+:\d*/, '') is here to remove :pserver:anonymous@foo.bar: string if present in the url
- if /^RCS file: #{Regexp.escape(root_url.gsub(/^:.*@[^:]+:\d*/, ''))}\/#{Regexp.escape(path_with_project)}(.+),v$/ =~ line
+ if /^RCS file: #{Regexp.escape(root_url_path)}\/#{Regexp.escape(path_with_project)}(.+),v$/ =~ line
entry_path = normalize_cvs_path($1)
entry_name = normalize_path(File.basename($1))
logger.debug("Path #{entry_path} <=> Name #{entry_name}")
@@ -273,6 +272,13 @@ module Redmine
end
private
+
+ # Returns the root url without the connexion string
+ # :pserver:anonymous@foo.bar:/path => /path
+ # :ext:cvsservername:/path => /path
+ def root_url_path
+ root_url.to_s.gsub(/^:.+:\d*/, '')
+ end
# convert a date/time into the CVS-format
def time_to_cvstime(time)