Sometimes there’s a particular changeset that you don’t want to be automatically merged. For example, perhaps your team’s policy is to do new development work on /trunk, but to be more conservative about backporting changes to a stable branch you use for releasing to the public. On one extreme, you can manually cherrypick single changesets from the trunk to the branch—just the changes that are stable enough to pass muster. Maybe things aren’t quite that strict, though; perhaps most of the time you’d like to just let svn merge automatically merge most changes from trunk to branch. In this case, you’d like a way to mask a few specific changes out, that is, prevent them from ever being automatically merged.
In Subversion 1.5, the only way to block a changeset is to make
the system believe that the change has already been
merged. To do this, one can invoke a merge command with the
$ cd my-calc-branch $ svn propget svn:mergeinfo . /trunk:1680-3305 # Let's make the metadata list r3328 as already merged. $ svn merge -c 3328 --record-only http://svn.example.com/repos/calc/trunk $ svn status M . $ svn propget svn:mergeinfo . /trunk:1680-3305,3328 $ svn commit -m "Block r3328 from being merged to the branch." ...
This technique works, but it’s also a little bit dangerous. The main problem is that we’re not clearly differentiating between the ideas of “I don’t want this change” and “I already have this change.” We’re effectively lying to the system, making ...