This has always lingered in the back of my mind, so I figure I might as well go ahead and ask.
How does a wiki handle multiple edits on the same content?
Here's a simplistic example of what I'm asking. Let's say that a page has the following content:
I'm a page!
And now let's say that two go to edit that page. Each person adds a sentence:
Person one:
I'm a page!
I'm a second sentence in the same page!
Person two:
I'm a page!
I'm a second sentence!
Imagine each person's second sentence being an equally relevant but different fact about the topic of the page that each person wanted to add in.
Now let's say that person one submits their changes before person two does, but person two doesn't even get a chance to see the changes that person one made. Does person two's changes overwrite those of person one when he finally goes to submit?
Is there a diff / merge algorithm that could be used for this?