mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-19 15:01:14 +00:00
scm: bazaar: refactor adapter annotate to use scm_cmd().
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5912 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
d4d75401b3
commit
7c03f30cd1
@ -199,12 +199,12 @@ module Redmine
|
|||||||
end
|
end
|
||||||
|
|
||||||
def annotate(path, identifier=nil)
|
def annotate(path, identifier=nil)
|
||||||
cmd = "#{self.class.sq_bin} annotate --all"
|
|
||||||
cmd << " -r#{identifier.to_i}" if identifier && identifier.to_i > 0
|
|
||||||
cmd << " #{target(path)}"
|
|
||||||
blame = Annotate.new
|
blame = Annotate.new
|
||||||
shellout(cmd) do |io|
|
cmd_args = %w|annotate --all|
|
||||||
author = nil
|
cmd_args << "-r#{identifier.to_i}" if identifier && identifier.to_i > 0
|
||||||
|
cmd_args << bzr_target(path)
|
||||||
|
scm_cmd(*cmd_args) do |io|
|
||||||
|
author = nil
|
||||||
identifier = nil
|
identifier = nil
|
||||||
io.each_line do |line|
|
io.each_line do |line|
|
||||||
next unless line =~ %r{^(\d+) ([^|]+)\| (.*)$}
|
next unless line =~ %r{^(\d+) ([^|]+)\| (.*)$}
|
||||||
@ -217,8 +217,9 @@ module Redmine
|
|||||||
))
|
))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return nil if $? && $?.exitstatus != 0
|
|
||||||
blame
|
blame
|
||||||
|
rescue ScmCommandAborted
|
||||||
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.branch_conf_path(path)
|
def self.branch_conf_path(path)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user