Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I tell subversion to always select my local version for conflicted merges on a specific file?

Tags:

I'm looking for a way to specify that a subset of files should not be changed when merging in modifications from a particular branch, using Subversion. I found someone asking the same question, but for git.

What I have is Maven pom.xml files, which are set up when the branch is created and updated for each release from the branch. When I merge changes back to trunk from the branch, I don't want the changes in these files to be merged (and they will actually always be in conflict, as the version numbers have been updated on trunk too). Is there any way to tell subversion to accept base for just these files, for the same effect as provided by the answer to the git question?

Someone else has asked a similar question, but put it in a context where the question was the wrong one to be asking (generated code).

like image 346
Andrew Aylett Avatar asked Jan 22 '10 16:01

Andrew Aylett


1 Answers

You could either script setting the svn:mergeinfo property on the file to have it skip merging changes made on the branch. (See http://svnbook.red-bean.com/en/1.7/svn.branchmerge.advanced.html#svn.branchmerge.advanced.blockchanges)

When I merge maven projects, I use TortoiseSVN, and deselect the changes to the pom done by the release plugin, so it does not try to merge in the version changes. Of course, I also want the other changes to the pom to be merged, since most of those changes are dependency changes, and I want trunk to get those new dependency updates.

like image 134
Larry Shatzer Avatar answered Nov 15 '22 07:11

Larry Shatzer