Subversion adapter: ignore directories with no commit date (#1370).

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1500 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2008-06-07 10:08:11 +00:00
parent aa9d04a4a7
commit 6d5db302ee
1 changed files with 3 additions and 0 deletions

View File

@ -64,6 +64,9 @@ module Redmine
begin begin
doc = REXML::Document.new(output) doc = REXML::Document.new(output)
doc.elements.each("lists/list/entry") do |entry| doc.elements.each("lists/list/entry") do |entry|
# Skip directory if there is no commit date (usually that
# means that we don't have read access to it)
next if entry.attributes['kind'] == 'dir' && entry.elements['commit'].elements['date'].nil?
entries << Entry.new({:name => entry.elements['name'].text, entries << Entry.new({:name => entry.elements['name'].text,
:path => ((path.empty? ? "" : "#{path}/") + entry.elements['name'].text), :path => ((path.empty? ? "" : "#{path}/") + entry.elements['name'].text),
:kind => entry.attributes['kind'], :kind => entry.attributes['kind'],