summaryrefslogtreecommitdiffstats
path: root/lib/redmine
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2009-01-04 13:27:48 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2009-01-04 13:27:48 +0000
commit859016523820efd5d343b9683a3e26eb3b7b28ba (patch)
tree0274b8dd4a4a4d7f0eec33e87bb87d2d9a277926 /lib/redmine
parent748fb30f587f800879fe5fcdf75378d277736b2e (diff)
downloadredmine-859016523820efd5d343b9683a3e26eb3b7b28ba.tar.gz
redmine-859016523820efd5d343b9683a3e26eb3b7b28ba.zip
Merged r2231 from 0.8-stable (#2402).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2232 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine')
-rw-r--r--lib/redmine/scm/adapters/darcs_adapter.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/redmine/scm/adapters/darcs_adapter.rb b/lib/redmine/scm/adapters/darcs_adapter.rb
index 658f06055..1cf792fb8 100644
--- a/lib/redmine/scm/adapters/darcs_adapter.rb
+++ b/lib/redmine/scm/adapters/darcs_adapter.rb
@@ -67,8 +67,8 @@ module Redmine
path = '.' if path.blank?
entries = Entries.new
cmd = "#{DARCS_BIN} annotate --repodir #{@url} --xml-output"
- cmd << " --match \"hash #{identifier}\"" if identifier
- cmd << " #{path}"
+ cmd << " --match #{shell_quote("hash #{identifier}")}" if identifier
+ cmd << " #{shell_quote path}"
shellout(cmd) do |io|
begin
doc = REXML::Document.new(io)
@@ -91,7 +91,7 @@ module Redmine
path = '.' if path.blank?
revisions = Revisions.new
cmd = "#{DARCS_BIN} changes --repodir #{@url} --xml-output"
- cmd << " --from-match \"hash #{identifier_from}\"" if identifier_from
+ cmd << " --from-match #{shell_quote("hash #{identifier_from}")}" if identifier_from
cmd << " --last #{options[:limit].to_i}" if options[:limit]
shellout(cmd) do |io|
begin
@@ -118,12 +118,12 @@ module Redmine
path = '*' if path.blank?
cmd = "#{DARCS_BIN} diff --repodir #{@url}"
if identifier_to.nil?
- cmd << " --match \"hash #{identifier_from}\""
+ cmd << " --match #{shell_quote("hash #{identifier_from}")}"
else
- cmd << " --to-match \"hash #{identifier_from}\""
- cmd << " --from-match \"hash #{identifier_to}\""
+ cmd << " --to-match #{shell_quote("hash #{identifier_from}")}"
+ cmd << " --from-match #{shell_quote("hash #{identifier_to}")}"
end
- cmd << " -u #{path}"
+ cmd << " -u #{shell_quote path}"
diff = []
shellout(cmd) do |io|
io.each_line do |line|
@@ -136,7 +136,7 @@ module Redmine
def cat(path, identifier=nil)
cmd = "#{DARCS_BIN} show content --repodir #{@url}"
- cmd << " --match \"hash #{identifier}\"" if identifier
+ cmd << " --match #{shell_quote("hash #{identifier}")}" if identifier
cmd << " #{shell_quote path}"
cat = nil
shellout(cmd) do |io|
@@ -171,7 +171,7 @@ module Redmine
# Retrieve changed paths for a single patch
def get_paths_for_patch(hash)
cmd = "#{DARCS_BIN} annotate --repodir #{@url} --summary --xml-output"
- cmd << " --match \"hash #{hash}\" "
+ cmd << " --match #{shell_quote("hash #{hash}")} "
paths = []
shellout(cmd) do |io|
begin