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