mozilla/kuma — pull request #46 by lmorchard (2011-11-10 23:02:11+00:00)
Title: Bug 688245 - kuma: section edits - collisions

* Added a "current_rev" field to RevisionForm

* Full page edit will result in conflict resolution UI if another edit
arrives before submission

* Save-and-edit iframe submission escapes out to conflict resolution UI
when conflict detected.

* Inline editor will bounce to full-page conflict resolution if the
edited section conflicts.

* Inline editor will refresh the page if a section submission could be
merged, but something else on the page changed.

* RevisionForm validation compares "current_rev" against the actual
current revision ID for the document. If not equal, there's probably a
conflict.

* If only a section is being edited, changed can be merged if the latest
revision has the same section content as the original revision where
editing began

* Current revision field added to edit_document template; omitted during
conflict resolution so user can choose to overwrite

* Conflict resolution UI added to edit_document template, shows diffs in
content like revision compare view.

* Current document revision tracked in document template; new message in
document template for page refresh on section edit merge.

* Hidden form in document template, used to bounce user to full conflict
resolution page when section edit conflicts.

* Raw content fetch now offers the current revision ID in a header

* Raw content edit submission will yield 409 Conflict status if a
section edit would cause a conflict.

* Raw content edit submission will yield 205 Reset status if a
section edit results in a merge.

* Utility method in Revision model for extracting a section from content

* Tests, tests, tests