What are the correct / best properties assigned to * .xml files in Subversion?
I am particularly interested in the svn:mime-type and svn:needs-lock properties.
I think there are two answers, but I'm not sure which one to choose. The first one is to treat XML files as text files, allowing Subversion to control text merges in them. For this, I would use svn:mime-type=text/xml and would not use svn:needs-lock .
Second, consider XML files as binary files, preventing Subversion from performing automatic merges and insisting on lock behavior before editing. For this, I would use svn:mime-type=application/xml and set svn:needs-lock .
I think itโs normal to treat XML as text if it is a kind of XML file that can be edited directly in a text editor, because the user will be able to resolve any possible merge conflicts manually. However, the XML files generated by the tool cannot be easily edited manually and therefore Subversion should not be automatically combined so that the user is not in a situation where he has to resolve the conflict in a (essentially) binary file.
Being conservative, I treat XML files as binary. But I always have to explain this to developers who would prefer to be able to edit some XML files directly, without having to block earlier.
I would like to know what others think about it, and whether there really is a danger associated with the tools generated by XML files or not.
SEQUENCE:
After reading the first three answers, I realized that the above question is not clear enough.
My doubt is what properties should be configured for *.xml in the [auto-props] section of the Subversion configuration file ( ~/.subversion/config )?
The problem is that there can only be one configuration. So, should I be conservative and treat all XML files as binary, or do I like users who edit their XML files manually and treat all XML files as default text?
xml mime-types svn
Gnustavo
source share