Opened 7 years ago

#6952 new defect

revisions need to be sorted in order to add in correct order

Reported by: alonlevy1@… Owned by: kgk
Priority: normal Component: MoinToTracScript
Severity: normal Keywords:
Cc: Trac Release: 0.11


Before this patch the revisions are added in the order os.listdir(revdir) returned, which is not always (and quite often in fact isn't) according to the revision order.

This oneliner fixes the issue: (you can remove the list there actually)

diff --git a/ b/ index da320d3..110ea7e 100755 --- a/ +++ b/ @@ -55,7 +55,7 @@ def convert(moindir, tracdir = None, mapfile = None):

admin.env_set (wikidir) revdir = moindir + '/' + page + '/revisions' if os.access(revdir, os.F_OK):

  • revisions = os.listdir(revdir)

+ revisions = list(sorted(os.listdir(revdir)))

for rev in revisions:

cmd='wiki import %s %s' % ( recodeName(page), revdir +'/'+rev) print cmd, "->", wikidir

Attachments (0)

Change History (0)

Add Comment

Modify Ticket

as new The owner will remain kgk.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.