prevent PageIdentity checks in RevisionStore from breaking xml dumps

Bug: T286877
Change-Id: I77de8d25a9722d0bea69206c48a77fc8f5bf46e2
This commit is contained in:
Ariel T. Glenn 2021-07-19 10:50:01 +03:00 committed by Ahmon Dancy
parent 1129135236
commit 14e58963fc

View file

@ -30,6 +30,7 @@
use MediaWiki\HookContainer\HookRunner;
use MediaWiki\MediaWikiServices;
use MediaWiki\Page\PageIdentity;
use MediaWiki\Revision\RevisionAccessException;
use MediaWiki\Revision\RevisionRecord;
use MediaWiki\Revision\RevisionStore;
use Wikimedia\Rdbms\IDatabase;
@ -539,8 +540,13 @@ class WikiExporter {
$output = $this->writer->openPage( $revRow );
$this->sink->writeOpenPage( $revRow, $output );
}
$output = $this->writer->writeRevision( $revRow, $slotRows );
$this->sink->writeRevision( $revRow, $output );
try {
$output = $this->writer->writeRevision( $revRow, $slotRows );
$this->sink->writeRevision( $revRow, $output );
} catch ( RevisionAccessException $ex ) {
MWDebug::warning( 'Problem encountered retrieving rev and slot metadata for'
. ' revision ' . $revRow->rev_id . ': ' . $ex->getMessage() );
}
$lastRow = $revRow;
}