From 332d88cd6782134edd769e34663f12635363d220 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 6 Mar 2010 20:14:09 +0000 Subject: [PATCH] Makes test pass with Bazaar 2.1.0 (#5002). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3550 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/scm/adapters/bazaar_adapter.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/redmine/scm/adapters/bazaar_adapter.rb b/lib/redmine/scm/adapters/bazaar_adapter.rb index 4d2c7414..ed240bf3 100644 --- a/lib/redmine/scm/adapters/bazaar_adapter.rb +++ b/lib/redmine/scm/adapters/bazaar_adapter.rb @@ -56,14 +56,14 @@ module Redmine shellout(cmd) do |io| prefix = "#{url}/#{path}".gsub('\\', '/') logger.debug "PREFIX: #{prefix}" - re = %r{^V\s+#{Regexp.escape(prefix)}(\/?)([^\/]+)(\/?)\s+(\S+)$} + re = %r{^V\s+(#{Regexp.escape(prefix)})?(\/?)([^\/]+)(\/?)\s+(\S+)$} io.each_line do |line| next unless line =~ re - entries << Entry.new({:name => $2.strip, - :path => ((path.empty? ? "" : "#{path}/") + $2.strip), - :kind => ($3.blank? ? 'file' : 'dir'), + entries << Entry.new({:name => $3.strip, + :path => ((path.empty? ? "" : "#{path}/") + $3.strip), + :kind => ($4.blank? ? 'file' : 'dir'), :size => nil, - :lastrev => Revision.new(:revision => $4.strip) + :lastrev => Revision.new(:revision => $5.strip) }) end end