title: Subversion: How to merge only specific revisions into trunk when multiple consecutive changes are made in a branch?
body: <p>I have been using TortoiseSVN, svn, and subclipse and I think I understand the basics, but there's one thing that's been bugging me for a while: Merging introduces unwanted code. Here's the steps.</p>
  
  <p><code>trunk/test.txt@r2</code>. A test file was created with 'A' and a return:</p>
  
  <pre><code>A
  [EOF]
  </code></pre>
  
  <p><code>branches/TRY-XX-Foo/test.txt@r3</code>. Branched out the <code>trunk</code> to <code>TRY-XX-Foo</code>:</p>
  
  <pre><code>A
  [EOF]
  </code></pre>
  
  <p><code>branches/TRY-XX-Foo/test.txt@r4</code>. Made an unwanted change in <code>TRY-XX-Foo</code> and committed it:</p>
  
  <pre><code>A
  B (unwanted change)
  [EOF]
  </code></pre>
  
  <p><code>branches/TRY-XX-Foo/test.txt@r5</code>. Made an important bug fix in <code>TRY-XX-Foo</code> and committed it:</p>
  
  <pre><code>A
  B (unwanted change)
  C (important bug fix)
  [EOF]
  </code></pre>
  
  <p>Now, I would like to merge only the important bug fix back to trunk. So, I run merge for revision <code>4:5</code>. What I end up in my working directory is a conflict.</p>
  
  <p><code>trunk/test.txt</code>:</p>
  
  <pre><code>A
  &lt;&lt;&lt;&lt;&lt;&lt;&lt; .working
  =======
  B (unwanted change)
  C (important bug fix)
  &gt;&gt;&gt;&gt;&gt;&gt;&gt; .merge-right.r5
  [EOF]
  </code></pre>
  
  <p>Against my will, Subversion has now included "unwanted change" into the trunk code, and I need to weed them out manually. Is there a way to merge only specified revisions when multiple consecutive changes are made in the branch?</p>
  
  <p>The part of the problem is that B (unwated change) is included in .merge-right and I can't tell the difference between which revision it came from. I usually use TortoiseMerge and here's how it looks.</p>
  
  <p><img src="https://i.stack.imgur.com/NG2g7.png" alt="text.txt.working"></p>