OSDN Git Service

scm: cvs: use scm_cmd() in adapter entries().
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 11 Mar 2011 00:42:59 +0000 (00:42 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 11 Mar 2011 00:42:59 +0000 (00:42 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5083 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/scm/adapters/cvs_adapter.rb

index 0a0f455..800b4cb 100644 (file)
@@ -99,10 +99,10 @@ module Redmine
           logger.debug "<cvs> entries '#{path}' with identifier '#{identifier}'"
           path_with_project="#{url}#{with_leading_slash(path)}"
           entries = Entries.new
-          cmd = "#{self.class.sq_bin} -d #{shell_quote root_url} rls -e"
-          cmd << " -D \"#{time_to_cvstime(identifier)}\"" if identifier
-          cmd << " #{shell_quote path_with_project}"
-          shellout(cmd) do |io|
+          cmd_args = %w|rls -e|
+          cmd_args << "-D" << time_to_cvstime(identifier) if identifier
+          cmd_args << path_with_project
+          scm_cmd(*cmd_args) do |io|
             io.each_line(){|line|
               fields=line.chop.split('/',-1)
               logger.debug(">>InspectLine #{fields.inspect}")
@@ -130,8 +130,9 @@ module Redmine
               end
             }
           end
-          return nil if $? && $?.exitstatus != 0
           entries.sort_by_name
+        rescue ScmCommandAborted
+          nil
         end
 
         STARTLOG="----------------------------"