Page MenuHomePhabricator

Use a hash-and-diff strategy to produce a diff layout for block-based documents
ClosedPublic

Authored by epriestley on Sep 25 2019, 9:05 PM.

Details

Summary

Depends on D20835. Ref T13425. Ref T13414. When a document has a list of content blocks, we may not be able to diff it directly, but we can hash each block and then diff the hashes (internally "diff" also does approximately the same thing).

We could do this ourselves with slightly fewer layers of indirection, but: diff already exists; we already use it; we already have a bunch of abstractions on top of it; and it's likely much faster on large inputs than the best we can do in PHP.

Test Plan

Diff Detail

Repository
rP Phabricator
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

epriestley created this revision.Sep 25 2019, 9:05 PM
epriestley requested review of this revision.Sep 25 2019, 9:07 PM
This revision was not accepted when it landed; it landed in state Needs Review.Sep 25 2019, 11:41 PM
This revision was automatically updated to reflect the committed changes.