Excellent, thank you! It would be particularly interesting to know what assumptions you make about the semantics of rev_parent_id. E.g. there
are three
revisions, A, B, and C, and revision B gets romoved - what should
revision C's
parent be?
Similarly, when revision X gets imported and inserted between A and B,
what
should revision B's parent be?
I think in such a case, revision C's parent should benull or 0. Similarly for revision X.
I dont view the parent as what revision came first but what revision was edited to make this revision (i.e. where the current revision was "forked" off from)
Yep, that was my thinking. I was going to save it for the IRC discussion, but since I can say this quickly: I use rev_parent_id to find the literal *previous* revision (revision that was "forked", as Brian says), for the purposes of immediate revert detection and for the diff size. I also do this for the subsequent revision, all with a single query (FROM revision then two JOINs on revision). If I can get this information just as easily by other means, my use case is satisfied.
Also quick side note, I hope it's obvious that viewing diff sizes on revision histories and contribution pages is essential. Indeed it's sometimes wrong, so obviously it'd be great if that could somehow be fixed :) I'm sure you smart people have some great ideas. Looking forward to the IRC discussion.
~Leon