Svn: revert file content changes without reverting any related mergeinfo?

607 Views Asked by At

If you've done a merge you may find, before committing the changes, that actually you don't want to accept any of the changes merged into one of the affected files. So you do e.g.:

$ svn revert foo.c

However this also seems to revert the mergeinfo related to this file. So when you do a subsequent merge it will merge in exactly the same changes again.

Rather than revert one could do:

$ svn cat foo.c > foo.c

But this doesn't seem like the right way to do things? Is there something that more clearly indicates what I'm trying to achieve, i.e. to say "consider the merge done for this file but don't change its contents"?

1

There are 1 best solutions below

3
On

To block a revision from getting merged, run the merge command with the --record-only param.