##// END OF EJS Templates
scm: cvs: use scm_cmd() in annotate of adapter....
Toshi MARUYAMA -
r5292:e9a33eff147c
parent child
Show More
@@ -308,12 +308,14 module Redmine
308 308 end
309 309
310 310 def annotate(path, identifier=nil)
311 identifier = (identifier) ? identifier.to_i : "HEAD"
311 identifier = (identifier) ? identifier : "HEAD"
312 312 logger.debug "<cvs> annotate path:'#{path}',identifier #{identifier}"
313 313 path_with_project="#{url}#{with_leading_slash(path)}"
314 cmd = "#{self.class.sq_bin} -d #{shell_quote root_url} rannotate -r#{identifier} #{shell_quote path_with_project}"
314 cmd_args = %w|rannotate|
315 cmd_args << "-D" << "#{time_to_cvstime(identifier)}" if identifier
316 cmd_args << path_with_project
315 317 blame = Annotate.new
316 shellout(cmd) do |io|
318 scm_cmd(*cmd_args) do |io|
317 319 io.each_line do |line|
318 320 next unless line =~ %r{^([\d\.]+)\s+\(([^\)]+)\s+[^\)]+\):\s(.*)$}
319 321 blame.add_line(
@@ -325,8 +327,9 module Redmine
325 327 ))
326 328 end
327 329 end
328 return nil if $? && $?.exitstatus != 0
329 330 blame
331 rescue ScmCommandAborted
332 Annotate.new
330 333 end
331 334
332 335 private
General Comments 0
You need to be logged in to leave comments. Login now