Mercurial > hg > soundsoftware-site
diff lib/redmine/scm/adapters/cvs_adapter.rb @ 909:cbb26bc654de redmine-1.3
Update to Redmine 1.3-stable branch (Redmine SVN rev 8964)
author | Chris Cannam |
---|---|
date | Fri, 24 Feb 2012 19:09:32 +0000 |
parents | cbce1fd3b1b7 |
children | 5e80956cc792 433d4f72a19b |
line wrap: on
line diff
--- a/lib/redmine/scm/adapters/cvs_adapter.rb Fri Feb 24 18:36:29 2012 +0000 +++ b/lib/redmine/scm/adapters/cvs_adapter.rb Fri Feb 24 19:09:32 2012 +0000 @@ -25,16 +25,13 @@ # CVS executable name CVS_BIN = Redmine::Configuration['scm_cvs_command'] || "cvs" - # raised if scm command exited with error, e.g. unknown revision. - class ScmCommandAborted < CommandFailed; end - class << self def client_command @@bin ||= CVS_BIN end def sq_bin - @@sq_bin ||= shell_quote(CVS_BIN) + @@sq_bin ||= shell_quote_command end def client_version @@ -379,13 +376,16 @@ end def scm_cmd(*args, &block) - full_args = [CVS_BIN, '-d', root_url] + full_args = ['-d', root_url] full_args += args full_args_locale = [] full_args.map do |e| full_args_locale << scm_iconv(@path_encoding, 'UTF-8', e) end - ret = shellout(full_args_locale.map { |e| shell_quote e.to_s }.join(' '), &block) + ret = shellout( + self.class.sq_bin + ' ' + full_args_locale.map { |e| shell_quote e.to_s }.join(' '), + &block + ) if $? && $?.exitstatus != 0 raise ScmCommandAborted, "cvs exited with non-zero status: #{$?.exitstatus}" end