- # Find list of revision dates for way and all constituent nodes
- revdates=[]
- Way.find(wayid).old_ways.collect do |a|
- revdates.push(a.timestamp)
- a.nds.each do |n|
- Node.find(n).old_nodes.collect do |o|
- revdates.push(o.timestamp)
- end
- end
- end
- waycreated=revdates[0]
- revdates.uniq!
- revdates.sort!
-
- # Remove any dates (from nodes) before first revision date of way
- revdates.delete_if { |d| d<waycreated }
- # Remove any elements where 2 seconds doesn't elapse before next one
- revdates.delete_if { |d| revdates.include?(d+1) or revdates.include?(d+2) }
-
-RAILS_DEFAULT_LOGGER.info("** revision dates: #{revdates.inspect}")
-RAILS_DEFAULT_LOGGER.info("** range: #{revdates[-1]-revdates[0]}")
-