Page MenuHomePhabricator

clean_sandbox: Create an -oldid: option
Open, MediumPublicFeature

Description

For rPWBC scripts/clean_sandbox.py would it be possible to add a -oldid:N flag where N would be the number of the permanent link/revision ID of the page is a clean state? Pywikibot can then attempt to restore the page to that revision (if it [still] exists e.g. not deleted/revdeleted/suppressed) otherwise the script should exit with error.

This could also be used to revamp or simply the script code making it wiki agnostic instead of either patching it for each wiki or using the -text: argument (which by the way it doesn't look it support line breaks?)

Thank you.

Event Timeline

Xqt triaged this task as Medium priority.Apr 3 2023, 9:55 AM

I think get_parsed_page() could be modified to get quick access to an old revision.

See also rPWBC9b5f454