Perhaps rather than having modx use it’s own source control or versioning (or even in addition to) how about integrating with the likes of SVN?
Have a settings page in modx which links the site to a base SVN repository (and path within the repository) - something like:
Protocol: file/svn/http/https
URL: my.svn.server.com/repo [or /path/to/repo for file type]
Port: 3960 [only used for svn/http type]
Base path: /trunk
modx could then create folders within the SVN repository when it’s created, and create files in the repositories for the elements. Chunks and snippets are cached anyway, so I don’t see it being a problem that they’re written to the file system first.
/path/to/repo
- trunk
- - chunks
- - - home page <-- category
- - - - adverts.tpl <-- chunk element
- - snippets
- - - generic <-- category
- - - - getResources.tpl <-- snippet element
- - templates
- - - home page <-- category
- - - - home.tpl <-- template element
You could also have an option then to revert the element back to a previous revision, which does an export from the repository, reads the text in and updates the database.
It would be more difficult to keep the database/repository in-sync as people could go into the repository to change things, but I’m sure we could come up with some form of verification utility.