##// END OF EJS Templates
Fixed: Darcs adapter works on Win32 only (wrong quotes in commands #2402)....
Jean-Philippe Lang -
r2229:567c8ed9b01d
parent child
Show More
@@ -67,8 +67,8 module Redmine
67 67 path = '.' if path.blank?
68 68 entries = Entries.new
69 69 cmd = "#{DARCS_BIN} annotate --repodir #{@url} --xml-output"
70 cmd << " --match \"hash #{identifier}\"" if identifier
71 cmd << " #{path}"
70 cmd << " --match #{shell_quote("hash #{identifier}")}" if identifier
71 cmd << " #{shell_quote path}"
72 72 shellout(cmd) do |io|
73 73 begin
74 74 doc = REXML::Document.new(io)
@@ -91,7 +91,7 module Redmine
91 91 path = '.' if path.blank?
92 92 revisions = Revisions.new
93 93 cmd = "#{DARCS_BIN} changes --repodir #{@url} --xml-output"
94 cmd << " --from-match \"hash #{identifier_from}\"" if identifier_from
94 cmd << " --from-match #{shell_quote("hash #{identifier_from}")}" if identifier_from
95 95 cmd << " --last #{options[:limit].to_i}" if options[:limit]
96 96 shellout(cmd) do |io|
97 97 begin
@@ -118,12 +118,12 module Redmine
118 118 path = '*' if path.blank?
119 119 cmd = "#{DARCS_BIN} diff --repodir #{@url}"
120 120 if identifier_to.nil?
121 cmd << " --match \"hash #{identifier_from}\""
121 cmd << " --match #{shell_quote("hash #{identifier_from}")}"
122 122 else
123 cmd << " --to-match \"hash #{identifier_from}\""
124 cmd << " --from-match \"hash #{identifier_to}\""
123 cmd << " --to-match #{shell_quote("hash #{identifier_from}")}"
124 cmd << " --from-match #{shell_quote("hash #{identifier_to}")}"
125 125 end
126 cmd << " -u #{path}"
126 cmd << " -u #{shell_quote path}"
127 127 diff = []
128 128 shellout(cmd) do |io|
129 129 io.each_line do |line|
@@ -136,7 +136,7 module Redmine
136 136
137 137 def cat(path, identifier=nil)
138 138 cmd = "#{DARCS_BIN} show content --repodir #{@url}"
139 cmd << " --match \"hash #{identifier}\"" if identifier
139 cmd << " --match #{shell_quote("hash #{identifier}")}" if identifier
140 140 cmd << " #{shell_quote path}"
141 141 cat = nil
142 142 shellout(cmd) do |io|
@@ -171,7 +171,7 module Redmine
171 171 # Retrieve changed paths for a single patch
172 172 def get_paths_for_patch(hash)
173 173 cmd = "#{DARCS_BIN} annotate --repodir #{@url} --summary --xml-output"
174 cmd << " --match \"hash #{hash}\" "
174 cmd << " --match #{shell_quote("hash #{hash}")} "
175 175 paths = []
176 176 shellout(cmd) do |io|
177 177 begin
General Comments 0
You need to be logged in to leave comments. Login now