In source control systems like Subversion the application can usually automatically merge changes that happen in different parts of the document, but will require user intervention to merge conflicts. Merge conflicts can be difficult to resolve even in plain text. I really don't know how you could automate that in plain text files, let alone arbitrary file formats.