]> source.dussan.org Git - redmine.git/commitdiff
Fixed: Broken pipe error when browsing subversion repository (#6860).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 20 Nov 2010 14:11:56 +0000 (14:11 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 20 Nov 2010 14:11:56 +0000 (14:11 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4419 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/scm/adapters/subversion_adapter.rb

index a4520a62ef0851e75bfdfc66c671de5fad26852c..f887df6328f655e733fee52b4b349b90a113109d 100644 (file)
@@ -36,8 +36,8 @@ module Redmine
             version = nil\r
             shellout(cmd) do |io|\r
               # Read svn version in first returned line\r
-              if m = io.gets.to_s.match(%r{((\d+\.)+\d+)})\r
-                version = m[0].scan(%r{\d+}).collect(&:to_i)\r
+              if m = io.read.to_s.match(%r{\A(.*?)((\d+\.)+\d+)})\r
+                version = m[2].scan(%r{\d+}).collect(&:to_i)\r
               end\r
             end\r
             return nil if $? && $?.exitstatus != 0\r