git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4941 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
2195984e35
commit
07b94a25f6
|
@ -42,7 +42,8 @@ class Repository < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def scm
|
def scm
|
||||||
@scm ||= self.scm_adapter.new url, root_url, login, password
|
@scm ||= self.scm_adapter.new(url, root_url,
|
||||||
|
login, password, path_encoding)
|
||||||
update_attribute(:root_url, @scm.root_url) if root_url.blank?
|
update_attribute(:root_url, @scm.root_url) if root_url.blank?
|
||||||
@scm
|
@scm
|
||||||
end
|
end
|
||||||
|
|
|
@ -63,7 +63,8 @@ module Redmine
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def initialize(url, root_url=nil, login=nil, password=nil)
|
def initialize(url, root_url=nil, login=nil, password=nil,
|
||||||
|
path_encoding=nil)
|
||||||
@url = url
|
@url = url
|
||||||
@login = login if login && !login.empty?
|
@login = login if login && !login.empty?
|
||||||
@password = (password || "") if @login
|
@password = (password || "") if @login
|
||||||
|
|
|
@ -62,7 +62,8 @@ module Redmine
|
||||||
# root_url -> the good old, sometimes damned, CVSROOT
|
# root_url -> the good old, sometimes damned, CVSROOT
|
||||||
# login -> unnecessary
|
# login -> unnecessary
|
||||||
# password -> unnecessary too
|
# password -> unnecessary too
|
||||||
def initialize(url, root_url=nil, login=nil, password=nil)
|
def initialize(url, root_url=nil, login=nil, password=nil,
|
||||||
|
path_encoding=nil)
|
||||||
@url = url
|
@url = url
|
||||||
@login = login if login && !login.empty?
|
@login = login if login && !login.empty?
|
||||||
@password = (password || "") if @login
|
@password = (password || "") if @login
|
||||||
|
|
|
@ -57,7 +57,8 @@ module Redmine
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def initialize(url, root_url=nil, login=nil, password=nil)
|
def initialize(url, root_url=nil, login=nil, password=nil,
|
||||||
|
path_encoding=nil)
|
||||||
@url = url
|
@url = url
|
||||||
@root_url = url
|
@root_url = url
|
||||||
end
|
end
|
||||||
|
|
|
@ -32,9 +32,10 @@ module Redmine
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def initialize(url, root_url=nil, login=nil, password=nil)
|
def initialize(url, root_url=nil, login=nil, password=nil,
|
||||||
|
path_encoding=nil)
|
||||||
@url = with_trailling_slash(url)
|
@url = with_trailling_slash(url)
|
||||||
@path_encoding = 'UTF-8'
|
@path_encoding = path_encoding || 'UTF-8'
|
||||||
end
|
end
|
||||||
|
|
||||||
def format_path_ends(path, leading=true, trailling=true)
|
def format_path_ends(path, leading=true, trailling=true)
|
||||||
|
|
|
@ -81,9 +81,9 @@ module Redmine
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def initialize(url, root_url=nil, login=nil, password=nil)
|
def initialize(url, root_url=nil, login=nil, password=nil, path_encoding=nil)
|
||||||
super
|
super
|
||||||
@path_encoding = 'UTF-8'
|
@path_encoding = path_encoding || 'UTF-8'
|
||||||
end
|
end
|
||||||
|
|
||||||
def info
|
def info
|
||||||
|
|
Loading…
Reference in New Issue