Let me suggest you not implement version control, but use one of the existing implementations. Version control is a lot of work to implement well and a lot to bother the user if he is not implemented well.
See, for example, how ikiwiki does this: it has plugins to distract the version control system and supports several, so the user can choose.
user25148