Extension:Offline/Versioning
Version numbers [edit]
Version strings are free-form text, only expected to be consistent within a single database instance. They can correspond to changesets, or detail row and even column deltas. I'm not sure what rules we need to impose here, not monotonicity. For example, a hybrid approach to version vector would be ordinary cardinals, "1", "2", ... then, when a branch occurs the string becomes "3:A" or what have you. Or you could use SHA's from git.
Merging [edit]
This is a treacherous slope, but we can pretty much put off the trouble by leaving unresolved conflicts for manual review. Identifying hunks that need 3-way merge is well known.
Fooling Mediawiki [edit]
Until non-linear revisioning is embraced by Mediawiki, we can emulate during the db sync process. That algorithm goes something like this (note that this can be a recursive upstream path, where changes are pooled into intermediate mediawiki servers on the way to propagate towards the hub, and back):
Merge batched changes into central Mediawiki
- Initial pass. Find title collisions, determine common ancestors if any.
- New ids from autoincrement