Project

General

Profile

Actions

Defect #1843

open

Importing trac's [wiki:"String WikiString"] translates to [[String [[WikiString]]]]

Added by Daniel Feliciano Branco about 16 years ago. Updated over 11 years ago.

Status:
Needs feedback
Priority:
Normal
Assignee:
-
Category:
Importers
Target version:
-
Start date:
2008-09-02
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

Description

Hi,

When importing trac's [wiki:"String WikiString"] it translates to [[String [[WikiString]]]]

Removing line source:/tags/0.7.3/lib/tasks/migrate_from_trac.rake#L244 solve this for me because I don't use WikiCaps.

I've tried to fix it, but don't have enough regexp magic.

ruby 1.8.5
rails 2.0.2

Thanks

daniel


Files

defect-1843.patch (705 Bytes) defect-1843.patch Patch based on Revision 1941 (trunk) Karl Heinz Marbaise, 2008-10-19 14:19
non-greedy.patch (1.3 KB) non-greedy.patch Patch based on Revision 1941 (trunk) Karl Heinz Marbaise, 2008-10-19 16:54
defect-1843-r2.patch (1.65 KB) defect-1843-r2.patch Patch based on 0.7.3 Daniel Feliciano Branco, 2008-11-11 17:08
defect-1843-r3.patch (1.8 KB) defect-1843-r3.patch Patch based on 0.7.3 Daniel Feliciano Branco, 2008-11-17 15:13
Actions #1

Updated by Daniel Feliciano Branco about 16 years ago

also:

Esta [...] linux [wiki:"gtitqb"] do itqb, [...] externa da [wiki:"fw"].

Na [wiki:"fw"] a rede [...] a [wiki:"DMZ"], onde [...] e a [wiki:"VPN"], utilizada [...]

gets imported to:

Esta [...] linux [[gtitqb"] do itqb [...] externa da [wiki"fw]].

Na [[fw"] a rede [...] a [wiki"DMZ"] onde [...] e a [wiki"VPN]], utilizada [...]

Thanks again.

daniel

Actions #2

Updated by Karl Heinz Marbaise about 16 years ago

Hi,
i have taken a look at it...

It seemed to be laying in the line source:/tags/0.7.3/lib/tasks/migrate_from_trac.rake#L237....
I have create a patch which will exactly handle the previous situation and is placed before the lines, cause i'm not sure if this has different relationships...but it will product correct results during test migrations.

Actions #3

Updated by Karl Heinz Marbaise about 16 years ago

Ok. I have take a second look and found out that many of these RegEx are using
greedy-behaviour (.* instead of .*?). I have appended a patch to use non-greedy-behaviour instead.
You can simply forget the defect-1843.patch).

Actions #4

Updated by Daniel Feliciano Branco about 16 years ago

  • % Done changed from 0 to 50

Hi,

I've tried your non-greedy.patch against version 0.7.3, and it solved the [[String [[WikiString]]]] issue. (thanks)

The "text [wiki:"page1"] text [wiki:"page2"] text." still gets converted to "text page1"] text [wiki"page2 text."
The problem is the " as "text [wiki:page1] text [wiki:page2] text." gets correctly converted.

Thanks again

daniel

Actions #5

Updated by Daniel Feliciano Branco about 16 years ago

  • % Done changed from 50 to 0

Hi,

My mistake, I still had a comment on line 244 that converted WikiCaps, the patch didn't fix it yet (as you stated on #2 comment)
Sorry about that.

daniel

Actions #6

Updated by Daniel Feliciano Branco about 16 years ago

Hi,
I've given another go at the regexp problem, started with your first patch and fixed the two problems, on the first check, not breaking any thing else.
daniel

Actions #7

Updated by Daniel Feliciano Branco about 16 years ago

I've find and solved another bug, [wiki:"test1/test2" "test"] didn't work.
Here is a patch against 0.7.3.
I've converted 2800 wiki edits from trac to reamine and we are now using redmine for our internal management.
Thanks for a great piece of software.

daniel

Actions #8

Updated by Etienne Massip over 13 years ago

  • Target version set to Candidate for next minor release
Actions #9

Updated by Daniel Felix almost 12 years ago

  • Status changed from New to Needs feedback

Again another trac importer bug. Any news on this? Maybe someone can confirm, that this is fixed?

Actions #10

Updated by Jan Niggemann (redmine.org team member) over 11 years ago

  • Target version deleted (Candidate for next minor release)
Actions

Also available in: Atom PDF