Fixes Bazaar adapter for JRuby/Win32 (#5404).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3723 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2010-05-01 09:56:59 +00:00
parent b897089729
commit 6a8dc735d3
1 changed files with 2 additions and 2 deletions

View File

@ -30,7 +30,7 @@ module Redmine
cmd = "#{BZR_BIN} revno #{target('')}" cmd = "#{BZR_BIN} revno #{target('')}"
info = nil info = nil
shellout(cmd) do |io| shellout(cmd) do |io|
if io.read =~ %r{^(\d+)$} if io.read =~ %r{^(\d+)\r?$}
info = Info.new({:root_url => url, info = Info.new({:root_url => url,
:lastrev => Revision.new({ :lastrev => Revision.new({
:identifier => $1 :identifier => $1
@ -56,7 +56,7 @@ module Redmine
shellout(cmd) do |io| shellout(cmd) do |io|
prefix = "#{url}/#{path}".gsub('\\', '/') prefix = "#{url}/#{path}".gsub('\\', '/')
logger.debug "PREFIX: #{prefix}" logger.debug "PREFIX: #{prefix}"
re = %r{^V\s+(#{Regexp.escape(prefix)})?(\/?)([^\/]+)(\/?)\s+(\S+)$} re = %r{^V\s+(#{Regexp.escape(prefix)})?(\/?)([^\/]+)(\/?)\s+(\S+)\r?$}
io.each_line do |line| io.each_line do |line|
next unless line =~ re next unless line =~ re
entries << Entry.new({:name => $3.strip, entries << Entry.new({:name => $3.strip,