Last modified: 2014-09-24 01:10:25 UTC
This feature is in the parse API, allowing you to perform a pre-save transform on the text before parsing it, however it is absent in the parsing part of the query revisions API. This is useful for things such as AJAX diff previews, where currently you have to do a normal page-reloading preview if you want to see PST things such as subst templates and signatures.
As stated, this request doesn't make any sense. The content being parsed by rvparse is what is already saved in the database, so it has already had the pre-save transform done on it before it was saved (hence the name "pre-save transform"). There's no reason to do the PST on it again. But it seems like what you really want is an option to perform the PST on the text passed to rvdifftotext before doing the diff, which could make a sort of sense. But the option shouldn't be named "rvparsepst" or "rvparseonlypst", it should be named something like "rvdifftotextpst" to associate it with what it applies to. I've taken the liberty of changing the bug title accordingly; if you disagree, feel free to revert and we'll go from there. Actually doing the PST then should be easy enough, you just need to call $difftocontent->preSaveTransform( ... ) in between creating $difftocontent and handing it off to the difference engine. All this is currently around line 600 of ApiQueryRevisions.php.
Sorry, I was misinterpreting the API docs, difftotext is what I meant. Thanks!
Since no one else has done this yet, I had a go at it and submitted the patch through the uploader. https://gerrit.wikimedia.org/r/#/c/122327/