]> source.dussan.org Git - redmine.git/commitdiff
scm: bazaar: refactor adapter diff to use scm_cmd_no_raise().
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 26 May 2011 06:16:44 +0000 (06:16 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 26 May 2011 06:16:44 +0000 (06:16 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5923 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/scm/adapters/bazaar_adapter.rb

index 39de200f3631b81ea524f013945d66ae70765fd8..97c1e322d34e7abf282c63b533227fc67045408b 100644 (file)
@@ -174,14 +174,15 @@ module Redmine
           if identifier_from
             identifier_from = identifier_from.to_i
           end
-          cmd = "#{self.class.sq_bin} diff -r#{identifier_to}..#{identifier_from} #{target(path)}"
           diff = []
-          shellout(cmd) do |io|
+          cmd_args = %w|diff|
+          cmd_args << "-r#{identifier_to}..#{identifier_from}"
+          cmd_args << bzr_target(path)
+          scm_cmd_no_raise(*cmd_args) do |io|
             io.each_line do |line|
               diff << line
             end
           end
-          #return nil if $? && $?.exitstatus != 0
           diff
         end