scm: bazaar: refactor adapter revisions to use scm_cmd().
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5929 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
b4edeb80cd
commit
dc9011467a
|
@ -112,10 +112,12 @@ module Redmine
|
||||||
identifier_from = (identifier_from and identifier_from.to_i > 0) ? identifier_from.to_i : 'last:1'
|
identifier_from = (identifier_from and identifier_from.to_i > 0) ? identifier_from.to_i : 'last:1'
|
||||||
identifier_to = (identifier_to and identifier_to.to_i > 0) ? identifier_to.to_i : 1
|
identifier_to = (identifier_to and identifier_to.to_i > 0) ? identifier_to.to_i : 1
|
||||||
revisions = Revisions.new
|
revisions = Revisions.new
|
||||||
cmd = "#{self.class.sq_bin} log -v --show-ids -r#{identifier_to}..#{identifier_from} #{target(path)}"
|
cmd_args = %w|log -v --show-ids|
|
||||||
shellout(cmd) do |io|
|
cmd_args << "-r#{identifier_to}..#{identifier_from}"
|
||||||
|
cmd_args << bzr_target(path)
|
||||||
|
scm_cmd(*cmd_args) do |io|
|
||||||
revision = nil
|
revision = nil
|
||||||
parsing = nil
|
parsing = nil
|
||||||
io.each_line do |line|
|
io.each_line do |line|
|
||||||
if line =~ /^----/
|
if line =~ /^----/
|
||||||
revisions << revision if revision
|
revisions << revision if revision
|
||||||
|
@ -163,8 +165,9 @@ module Redmine
|
||||||
end
|
end
|
||||||
revisions << revision if revision
|
revisions << revision if revision
|
||||||
end
|
end
|
||||||
return nil if $? && $?.exitstatus != 0
|
|
||||||
revisions
|
revisions
|
||||||
|
rescue ScmCommandAborted
|
||||||
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
def diff(path, identifier_from, identifier_to=nil)
|
def diff(path, identifier_from, identifier_to=nil)
|
||||||
|
|
Loading…
Reference in New Issue