From: Jean-Philippe Lang Date: Sat, 20 Nov 2010 14:11:56 +0000 (+0000) Subject: Fixed: Broken pipe error when browsing subversion repository (#6860). X-Git-Tag: 1.1.0~163 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1158716f46a8a1559ebc5d9ec0f8310c10defc5f;p=redmine.git Fixed: Broken pipe error when browsing subversion repository (#6860). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4419 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/lib/redmine/scm/adapters/subversion_adapter.rb b/lib/redmine/scm/adapters/subversion_adapter.rb index a4520a62e..f887df632 100644 --- a/lib/redmine/scm/adapters/subversion_adapter.rb +++ b/lib/redmine/scm/adapters/subversion_adapter.rb @@ -36,8 +36,8 @@ module Redmine version = nil shellout(cmd) do |io| # Read svn version in first returned line - if m = io.gets.to_s.match(%r{((\d+\.)+\d+)}) - version = m[0].scan(%r{\d+}).collect(&:to_i) + if m = io.read.to_s.match(%r{\A(.*?)((\d+\.)+\d+)}) + version = m[2].scan(%r{\d+}).collect(&:to_i) end end return nil if $? && $?.exitstatus != 0