SCM AbstractAdapter use shell_quote to more properly escape path (closes #838 by John Goerzen).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1238 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
d4429a544c
commit
2c1e63720e
|
@ -101,9 +101,9 @@ module Redmine
|
||||||
end
|
end
|
||||||
|
|
||||||
def target(path)
|
def target(path)
|
||||||
path ||= ""
|
path ||= ''
|
||||||
base = path.match(/^\//) ? root_url : url
|
base = path.match(/^\//) ? root_url : url
|
||||||
" \"" << "#{base}/#{path}".gsub(/["?<>\*]/, '') << "\""
|
shell_quote("#{base}/#{path}".gsub(/[?<>\*]/, ''))
|
||||||
end
|
end
|
||||||
|
|
||||||
def logger
|
def logger
|
||||||
|
|
|
@ -100,7 +100,7 @@ module Redmine
|
||||||
cmd = "#{SVN_BIN} log --xml -r #{identifier_from}:#{identifier_to}"
|
cmd = "#{SVN_BIN} log --xml -r #{identifier_from}:#{identifier_to}"
|
||||||
cmd << credentials_string
|
cmd << credentials_string
|
||||||
cmd << " --verbose " if options[:with_paths]
|
cmd << " --verbose " if options[:with_paths]
|
||||||
cmd << target(path)
|
cmd << ' ' + target(path)
|
||||||
shellout(cmd) do |io|
|
shellout(cmd) do |io|
|
||||||
begin
|
begin
|
||||||
doc = REXML::Document.new(io)
|
doc = REXML::Document.new(io)
|
||||||
|
@ -139,7 +139,7 @@ module Redmine
|
||||||
cmd = "#{SVN_BIN} diff -r "
|
cmd = "#{SVN_BIN} diff -r "
|
||||||
cmd << "#{identifier_to}:"
|
cmd << "#{identifier_to}:"
|
||||||
cmd << "#{identifier_from}"
|
cmd << "#{identifier_from}"
|
||||||
cmd << "#{target(path)}@#{identifier_from}"
|
cmd << " #{target(path)}@#{identifier_from}"
|
||||||
cmd << credentials_string
|
cmd << credentials_string
|
||||||
diff = []
|
diff = []
|
||||||
shellout(cmd) do |io|
|
shellout(cmd) do |io|
|
||||||
|
|
Loading…
Reference in New Issue