I'm using XIB files in Xcode. it's XML file, but actually it's not a simple source code, and its internal structure is organized as hierarchical references. So simple diff/merge model never work.
The problem is SVN treats that XIB files as simple text source code file. I have to avoid this. How to force SVN handle these files always as binary behavior. (lock/unlock model)
preguntado el 08 de noviembre de 11 a las 13:11
As, Cedric Julien said, you need to set the property
svn:mime-type on the file to make sure it's treated as a binary file. Subversion looks at the first X bytes of a file to determine if it's binary or text, and sometimes it doesn't work all the time. I know PDF files can confuse it too.
You need to use a pre-commit hook to make sure that your developers store these files as binary files. The developers can use auto-properties to help them automatically set the svn:mime-type property on XIB and NIBs, but you still need the pre-commit hook to verify that this property is there.
Puedes usar mi pre-commit-kitchen-sink-hook.pl which allows you to verify that particular files have a particular property attached to them and that property has a particular value.
match = \.(nib|xib|pdf)$ property = svn:mime-type value = application/octet-stream type = string