diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-04-11 06:30:07 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-04-11 06:30:07 +0000 |
commit | 717e2a0a9fd3093b2d3e7a106ec8848c34c3ac98 (patch) | |
tree | 32da6323a0d9bc30ffe2758dbec8a9b578099286 /lib/redmine | |
parent | 51242b967d3a9f99a527c54b262082cbb3986a27 (diff) | |
download | redmine-717e2a0a9fd3093b2d3e7a106ec8848c34c3ac98.tar.gz redmine-717e2a0a9fd3093b2d3e7a106ec8848c34c3ac98.zip |
scm: cvs: use scm_cmd() in cat.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5395 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine')
-rw-r--r-- | lib/redmine/scm/adapters/cvs_adapter.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/redmine/scm/adapters/cvs_adapter.rb b/lib/redmine/scm/adapters/cvs_adapter.rb index de8f65e35..856f83818 100644 --- a/lib/redmine/scm/adapters/cvs_adapter.rb +++ b/lib/redmine/scm/adapters/cvs_adapter.rb @@ -294,16 +294,17 @@ module Redmine identifier = (identifier) ? identifier : "HEAD" logger.debug "<cvs> cat path:'#{path}',identifier #{identifier}" path_with_project="#{url}#{with_leading_slash(path)}" - cmd = "#{self.class.sq_bin} -d #{shell_quote root_url} co" - cmd << " -D \"#{time_to_cvstime(identifier)}\"" if identifier - cmd << " -p #{shell_quote path_with_project}" + cmd_args = %w|co| + cmd_args << "-D" << "#{time_to_cvstime(identifier)}" if identifier + cmd_args << "-p" << path_with_project cat = nil - shellout(cmd) do |io| + scm_cmd(*cmd_args) do |io| io.binmode cat = io.read end - return nil if $? && $?.exitstatus != 0 cat + rescue ScmCommandAborted + nil end def annotate(path, identifier=nil) |