diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-11-11 13:32:22 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-11-11 13:32:22 +0000 |
commit | 876a9b6ffb49319e1c07e7ac12c471077f391db1 (patch) | |
tree | 3aab0678e9095a003cb1dc7719ac7d37764d9a69 /lib/tasks | |
parent | d545ca736070e3117637e9ea1b065df07ab705d2 (diff) | |
download | redmine-876a9b6ffb49319e1c07e7ac12c471077f391db1.tar.gz redmine-876a9b6ffb49319e1c07e7ac12c471077f391db1.zip |
Fixed: Trac milestone links not correctly converted (#2052).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2014 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/tasks')
-rw-r--r-- | lib/tasks/migrate_from_trac.rake | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/tasks/migrate_from_trac.rake b/lib/tasks/migrate_from_trac.rake index 88f9fbc39..14b0c2383 100644 --- a/lib/tasks/migrate_from_trac.rake +++ b/lib/tasks/migrate_from_trac.rake @@ -268,13 +268,23 @@ namespace :redmine do text = text.gsub(/^(\=+)\s(.+)\s(\=+)/) {|s| "\nh#{$1.length}. #{$2}\n"} # External Links text = text.gsub(/\[(http[^\s]+)\s+([^\]]+)\]/) {|s| "\"#{$2}\":#{$1}"} - # Situations like the following: + # Ticket links: # [ticket:234 Text],[ticket:234 This is a test] text = text.gsub(/\[ticket\:([^\ ]+)\ (.+?)\]/, '"\2":/issues/show/\1') - # Situations like: # ticket:1234 # #1 is working cause Redmine uses the same syntax. text = text.gsub(/ticket\:([^\ ]+)/, '#\1') + # Milestone links: + # [milestone:"0.1.0 Mercury" Milestone 0.1.0 (Mercury)] + # The text "Milestone 0.1.0 (Mercury)" is not converted, + # cause Redmine's wiki does not support this. + text = text.gsub(/\[milestone\:\"([^\"]+)\"\ (.+?)\]/, 'version:"\1"') + # [milestone:"0.1.0 Mercury"] + text = text.gsub(/\[milestone\:\"([^\"]+)\"\]/, 'version:"\1"') + text = text.gsub(/milestone\:\"([^\"]+)\"/, 'version:"\1"') + # milestone:0.1.0 + text = text.gsub(/\[milestone\:([^\ ]+)\]/, 'version:\1') + text = text.gsub(/milestone\:([^\ ]+)/, 'version:\1') # Internal Links text = text.gsub(/\[\[BR\]\]/, "\n") # This has to go before the rules below text = text.gsub(/\[\"(.+)\".*\]/) {|s| "[[#{$1.delete(',./?;|:')}]]"} |