HomePhabricator

Pages revisions code cleanup

Authored by Xqt.

Description

Pages revisions code cleanup

  • Use Page.revisions() generator to retrieve Revision objects. This is derived from site.loadrevisions and will solve some bugs like T66188 and T57261
  • add rollback parameter for revisions method already supported by loadrevisions
  • getVersionHistory() and fullVersionHistory() are deprecated and it is recommended to use revisions() instead.
  • getitem() if Revision class enables indexed read access to its values. This may be used for format strings, a sample is made in getVersionHistoryTable()
  • deprecate some args on several methods, rename "reverseOrder" with "reverse" and "getText" with "content"
  • use Page.revisions methid for latest_revision_id() and latest_revision() methods

Change-Id: I35fe88849655b7dda3763ac7fa37802d8149e636

Details