#1203 closed defect (fixed)
trac-admin's wiki dump feature fails on hierarchical pages
Reported by: | Owned by: | Mark Rowe | |
---|---|---|---|
Priority: | normal | Milestone: | 0.9 |
Component: | admin/console | Version: | 0.8 |
Severity: | normal | Keywords: | rac-admin wiki dump hierarchical pages |
Cc: | peter.fischer@… | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
I have hierarchcal wikipages in one of my trac wikis e.g.: http://trac.srv/infrastruktur/wiki/TerraSelEinkauf/IngramMicro
http://projects.edgewall.com/trac/wiki/WikiPageNames does allow this:
5. The use of slash ( / ) is permitted to create a hierarchy inside the wiki.
Error description: if I want to dump all wiki pages using trac-admin's wiki dump function, the following occurs:
apache ~% mkdir test apache ~% cd test apache ~/test% mkdir dumpdestination apache ~/test% trac-admin /var/lib/trac/infrastruktur wiki dump dumpdestination TracReports => dumpdestination/TracReports [...lots of wiki root level pages being dumped correctly...] TelefonListe => dumpdestination/TelefonListe TerraSelEinkauf => dumpdestination/TerraSelEinkauf TerraSelEinkauf/IngramMicro => dumpdestination/TerraSelEinkauf/IngramMicro Wiki dump failed: [Errno 20] Not a directory: 'dumpdestination/TerraSelEinkauf/IngramMicro' apache ~/test%
The bug consists of three errors:
- Dumping hierarchical wikipages using trac-admin's wiki dump function does not work.
- trac-admin breaks after error, so all pages after the first hierarchical one are ommitted, too.
- trac-admin does not inform about its failure, so a backup script can not decide about success or error:
TerraSelEinkauf/IngramMicro => dumpdestination/TerraSelEinkauf/IngramMicro Wiki dump failed: [Errno 20] Not a directory: 'dumpdestination/TerraSelEinkauf/IngramMicro' apache ~/test% echo $? 0
I use gentoo linux and stock trac 0.8.
Attachments (0)
Change History (6)
comment:1 by , 20 years ago
comment:2 by , 20 years ago
I believe that the code you suggest will break when you have both FooBar
and FooBar/BarFoo
as you cannot have a file + directory of the same name. A possible solution may be to output the files with their names URL-encoded. This would result in files named FooBar
and FooBar%2FBarFoo
being created for the case mentioned above.
comment:3 by , 20 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:5 by , 19 years ago
Milestone: | → 0.9 |
---|
Replace trac-admin function with following code.
I test it on Windows XP.