Commit graph

4 commits

Author SHA1 Message Date
daniel
e8632ab0f6 [MCR] Factor PageUpdater out of WikiPage
This introduces PageUpdater to replace WikiPage::doEditContent,
and DerivedPageDataUpdater, to replace WikiPage::doEditUpdates
and WikiPage::prepareContentForEdit.

See docs/pageupdater.txt for a description of their
functionality.

MCR migration notes:

* The interface of PageUpdater is expected to
remain mostly stable after this patch. Code that has been using
WikiPage::doEditContent can be confidently migrated to using the
new mechanism for revision creation.

* This patch keeps the code inside PageUpdater largely aligned
with the old code in WikiPage, to make review easier to to avoid
mistakes. It is intended to be refactored further, moving
application logic into stateless services.

* DerivedPageDataUpdate is intended as a stepping stone for further
refactoring. Its behavior is designed to be compatible with
callback code that currently relies on
WikiPage::prepareContentForEdit. Much of the code that currently
lives in DerivedPageDataUpdate should be factored out into
services, all behavior relevant to calling code should be exposed
via narrow interfaces.

Bug: T174038
Bug: T196653
Change-Id: If610c68f4912e89af616cdcac1d35a1be3946afa
2018-06-14 13:22:13 +00:00
daniel
8b0506bd8b
[MCR] Introduce RevisionSlotsUpdate.
The RevisionSlotsUpdate interface represents a change to a pages slots,
as applied by an edit.

This also introduces RevisionSlots::hasSameContent and pulls up
getTouchedSlots() and getInheritedSlots() from MutableRevisionStore
to RevisionStore, in preparation of using these classes in the
refactoring of WikiPage::doEditContent and friends.

Bug: T174038
Change-Id: Idb0ef885b343a76137b640fdfc1bf36104b00895
2018-05-08 15:58:51 +02:00
daniel
8e85cd44bc Introduce hasSlot in RevisionRecord and RevisionSlots.
Change-Id: Ie7ee2afe26d37ac726f4682c96166cb89134227c
2018-02-26 17:34:48 +00:00
addshore
06127159e8 [MCR] Tests for RevisionStore & Related classes
Code introduced in:
I140f43a6fb443b38483f41f268c906b9cea64cf7

Change-Id: Iefad870baf2d16f12e9901b303246c64d6431ca6
2017-12-14 13:44:55 +00:00