Retrieve root_url if needed (#4377).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3158 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2009-12-12 10:35:16 +00:00
parent d905f2ce7e
commit 008f35277e
1 changed files with 1 additions and 1 deletions

View File

@ -84,6 +84,6 @@ class Repository::Subversion < Repository
# url = file:///var/svn/foo/bar
# => returns /bar
def relative_url
@relative_url ||= url.gsub(Regexp.new("^#{Regexp.escape(root_url)}", Regexp::IGNORECASE), '')
@relative_url ||= url.gsub(Regexp.new("^#{Regexp.escape(root_url || scm.root_url)}", Regexp::IGNORECASE), '')
end
end