Benjamin Leinweber
Benjamin Leinweber

Reputation: 2944

Can you mark a file to never be merged in SVN?

I have a group of several projects that are interconnected and some projects require the build files from other projects. For several reasons we have committed build these prerequisite build files to the repository.

Every time I try to merge changes from a branch into the trunk or vice-versa, these files will always conflict as they are binarys. If required, I can rebuild the files from the source project before committing the merge.

However it is really annoing to have to always type "mf" for "mine-full" when doing the merge.

Is it at all possible to permanently mark a binary file as not-mergable in SVN so that it will just always assume mine-full?

I am open to simple scripts if this makes it possible.

P.S. Please do not turn this into a discussion on whether or not it is a good idea to commit build files to a repository.

P.P.S I am using SVN client 1.7.8 with an SVN server 1.7.5.

Upvotes: 2

Views: 576

Answers (1)

Lazy Badger
Lazy Badger

Reputation: 97282

You have at least two choices

  • Replace dumb merge by sequence of two merges: first merge will merge only your binaries with special options: svn merge -q --accept 'mine-full' ..., second merge merges tree
  • You can define in Subversion special merge-tool, in which you process you binary special way (same merge as above): use mergewrap.bat and the whole "Using External Differencing and Merge Tools" section from SVNBook as starting point

Upvotes: 1

Related Questions