Kids complain, real man submit patches. Here is one attached which fixes both 
problems (sorry, still learning how to use reportbug... I had this patch when 
I opened the bug report...)

Regarding the upstream request: I will do my best, lets hope they do want to 
do this. 

Can you explain why the other patch is needed?

--- migrate_from_trac.rake.orig	2010-04-06 13:12:15.770691205 +0000
+++ migrate_from_trac.rake	2010-04-06 13:22:05.532183032 +0000
@@ -310,7 +310,8 @@
         # Ticket number re-writing
         text = text.gsub(/#(\d+)/) do |s|
           if $1.length < 10
-            TICKET_MAP[$1.to_i] ||= $1
+           # see http://www.redmine.org/issues/4931
+           # TICKET_MAP[$1.to_i] ||= $1
             "\##{TICKET_MAP[$1.to_i] || $1}"
           else
             s
@@ -458,7 +459,9 @@
 
         # Tickets
         print "Migrating tickets"
-          TracTicket.find_each(:batch_size => 200) do |ticket|
+          # not sure why this works, but i like black magic anyway
+          # TracTicket.find_each(:batch_size => 200) do |ticket|
+          TracTicket.find(:all).each do |ticket|
           print '.'
           STDOUT.flush
           i = Issue.new :project => @target_project,

Reply via email to