CVS and Subversion both have a handy merge feature so that when you update a source file that you have modified, it merges in changes that others have made on the same file.
However, if your changes and the other ones are incompatible - generally if you have both changed the same parts of the code - it will create a conflict. Both stretches of source code will be included into the merged file and you need to manually sort out which changes to keep. All fine so far.
My problem is that some of us use different development environments (Netbeans versus vi if you must know) and Netbeans has an auto-indenting feature which re-indents the code. Therefore, when we merge changes, we sometimes get huge conflicts which are mostly caused by simple changes in indentation and are not genuine changes to code. Often these create hundreds of lines of apparent conflicts which have to be manually resolved, but usually they come down to just a few lines of real changes. A similar situation occurs when someone's editor changes unix to Windows newlines or vice versa.
So - can I set merge to ignore these "conflicts" when comparing the two versions? Diff has the --ignore-space-change or -b option and I would like to have essentially the same feature available in cvs or svn. We use each tool on different projects so I would be happy to have the answer for either or both.
Two final notes:
- clearly the merge process would have to make an arbitrary choice as to which version of the whitespace to use in the merged file. I'm fine with that - we can always reformat it again later.
- I could avoid some of this by being more disciplined and checking in more often - acknowledged and understood. But I am not perfect.