Summary: Greatly improved Export and Import for 1.14.1 (will
                    port into trunk soon)
           Product: MediaWiki
           Version: 1.14.1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: Normal
         Component: Export/Import

Created an attachment (id=7222)
 --> (
A patch for MediaWiki 1.14.1

In our company (Customized InformSystems,, we use
MediaWiki for maintaining corporate knowledgebases, and I'm responsible for its
support and etc. Sorry in advance for my english :-)

I have greatly improved MediaWiki XML Export and Import mechanism and I want to
submit a patch. The following features are added:
* Support for exporting and importing UPLOADS - either attached inside the
output file, which will be a multipart/related document with binary parts in
this case, or as URLs + SHA1 hashes inside the XML document, so that
destination Wiki could download them by itself.
* Support for selecting pages from category with subcategories.
* Support for selecting pages from specific namespace.
* Support for selecting pages modified after a specific date.
* Support for selecting pages linked to selected ("pagelinks closure").
* The DVCS-like detection of "conflicts" during import and extended import
report with 5 types of messages:
1) All revisions were previously imported. No local changes.
2) All revisions were previously imported. Page changed locally.
3) N revisions imported.
4) N revisions imported (new page).
5) N revisions imported (conflict: XX (import) and YY (local)).
* With all these improvements, the import mechanism is backwards compatible and
is able to import dumps from MediaWikis without these improvements.

Unfortunately (or fortunately? :-D), the patch requires a change to
filerepo/LocalFile.php, because there is an irrationality: archived versions of
uploads (oldimages) are stored with the timestamp in the file name which IS NOT
EQUAL to the oldimage timestamp in the database. The timestamp in the file name
is the timestamp of archiving, i.e. the timestamp of NEXT revision of upload.
IMO, it is an inconsistent behaviour: oldimage file names depend on the order
of import. So I'll submit a patch and a tool to convert timestamps in the
oldimage archive.

I think all these features are very useful for MediaWiki users, so I ask you if
it is possible to incorporate these changes into the MediaWiki code? Now, they
are written against 1.14.1, but I can port them into trunk, if it is needed.
The patch submitted also DOES NOT conform to your code-style, for example, I
hate adding spaces after opening and before closing braces. But if it is
needed, I can change the patch to conform.

But I think you can anyway start reviewing the patch :) IMO, it's very useful.

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

Wikibugs-l mailing list

Reply via email to