Saving Revision History

76 views
Skip to first unread message

Patrick Burrows

unread,
Sep 4, 2014, 1:04:54 PM9/4/14
to diff-mat...@googlegroups.com
Can anyone talk about recommendations for saving a complete revision history for a document? Specifically, what do you save? The patches? The diffs? How do you handle revisions from multiple people? Do you have a "virtual user" that maintains a view of a document and just receives revisions but never makes changes? (I seem to remember Neil referring to that in his Google Tech Talk video, but I may be remembering wrong). If you follow that strategy, how do you know which user made each edit? (the patches don't have that level of detail). 

Or, do you just save the timestamped deltas as they come in to the server? This way you can save the user who made the edits. But displaying a revision would then require a lot of gymnastics (calculate text of revision before doing a diff with head).

Another (bad) strategy would be to save the full document with patches applied after every delta. This would let you save the user who made the edits, and would make calculating the diffs trivially easy (no need to calculate the text of the revision, just do a straight up diff with the head). But the storage requirements here would be tremendous! Which, obviously, makes it a terrible idea.

So... what strategies have you used? What is the best strategy?
Reply all
Reply to author
Forward
0 new messages