﻿ticket,summary,type,release,owner,status,created,modified,_description,_reporter
6952,revisions need to be sorted in order to add in correct order,defect,0.11,Kristian Kvilekval,new,2010-04-08T13:47:30+02:00,2010-04-08T13:47:30+02:00,"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/moin2trac.py b/moin2trac.py
index da320d3..110ea7e 100755
--- a/moin2trac.py
+++ b/moin2trac.py
@@ -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
",alonlevy1@…
4666,Add revision information for pages,enhancement,0.11,Kristian Kvilekval,new,2009-02-19T22:54:30+01:00,2009-03-02T23:55:52+01:00,It would be nice to have the author/date/ip information added with the wiki pages and attachments.  I've made some modifications to that effect and attached an updated script.,casey@…
2727,Updated Moin2trac.py for 0.11,defect,0.11,Kristian Kvilekval,assigned,2008-03-13T16:03:51+01:00,2008-03-24T14:08:42+01:00,"The previous script I submitted did not correctly set the versions in trac.  The result was the trac had all of the oldest revisions, not the latest.

This script only imports the latest revision of any moin page.  Its also a good idea to test the import before you do it in your production environment, moin sometimes has the current version number set incorrectly or there are lock files in the pages directly causing the script to fail.  I could probably fix this but my work here is done, I have migrated from moin to trac...

Good luck, Adam",adam@…
