When you do a merge, you can accept which conflict you prefer to take. In Subversion, you can select theirs
meaning the branch you're merging from or yours
meaning the branch you're working on. In the command line, you can also specify if you want to only accept theirs
or yours
for just where the conflicts are, or the whole file. TortoiseSVN also offers the same options.
Of course, if pom.xml
is truly messed up (maybe one of the developers decided to restructure the whole thing, so there's little match between the trunk and your branch), you can always do a revert after the merge. It's like skipping pom.xml
during the merge.
I've had problems of developers helpfully restructuring a file and then having problems with merging because merges are mostly textual analysis, and can't handle file restructuring. The best thing to do is to revert pom.xml
, and then find some sort of XML diff tool that can help you figure out the differences, and merge the ones you do want to keep.
Then make the changes that are needed in the pom.xml
, and commit the merge after doing a manual merge of the pom.xml
file.