title: Subversion not merging changes into renamed files?
body: <p>I have the following problem using subversion:</p>
  
  <p>I'm currently working on the trunk of my project and plan to do some refactoring (which includes renaming files or moving files to different directories).</p>
  
  <p>At the same time someone else is working on the same project on a branch.</p>
  
  <p>At some time I want to merge the changes made on the branch back to the trunk. That includes changes made to files (on the branch) that have been renamed on the trunk.</p>
  
  <p>I did some tests and it seems that either subversion is not capable of following these changes or I'm missing someting (which is what I hope for). I tested this using the following script (should work in bash, assumes an svn repository at "<a href="http://myserver/svn/sandbox" rel="noreferrer">http://myserver/svn/sandbox</a>"):</p>
  
  <pre><code>svn co http://myserver/svn/sandbox
  
  cd sandbox/
  
  mkdir -p MyProject/trunk MyProject/branches MyProject/tags
  
  cat - &lt;&lt;EOF &gt;MyProject/trunk/FileOne.txt
  Test
  1
  2
  EOF
  
  svn add MyProject
  
  svn commit -m "init"
  
  # create a branch
  svn copy http://myserver/svn/sandbox/MyProject/trunk http://myserver/svn/sandbox/MyProject/branches/Branch_1 svn copy http://myserver/svn/sandbox/MyProject/trunk http://myserver/svn/sandbox/MyProject/branches/Branch_1
  
  # rename the file
  svn move MyProject/trunk/FileOne.txt MyProject/trunk/FileTwo.txt
  
  svn commit -m "renamed file"
  
  svn update 
  
  # change the content of FileOne in branch
  
  cat - &lt;&lt;EOF &gt;MyProject/branches/Branch_1/FileOne.txt
  Test
  2
  3
  EOF
  
  svn commit -m "changed branch"
  
  # I now try to merge the changes in FileOne back to FileTwo
  cd MyProject/trunk/
  svn merge -r1:HEAD http://myserver/svn/sandbox/MyProject/branches/Branch_1
  # but this yields the following message:
  # Skipped missing target: 'FileOne.txt'
  </code></pre>
  
  <p>Any help is greatly appreciated.</p>
  
  <p>Edit: 
  Perhaps the process suggested by mikegrb could by somewhat automated by first generating a map of renamed files (old->new) from the svn log command on the trunk:</p>
  
  <pre><code>svn log -v
  ------------------------------------------------------------------------
  r33 | sme | 2008-10-09 15:17:54 +0200 (Do, 09 Okt 2008) | 1 line
  Changed paths:
     D /MyProject/trunk/FileOne.txt
     A /MyProject/trunk/FileTwo.txt (from /MyProject/trunk/FileOne.txt:31)
  
  
  resulting map: {FileOne.txt =&gt; FileTwo.txt}
  </code></pre>
  
  <p>Now use this map to change filenames in the patch file generated on the branch. </p>
  
  <p>Original:</p>
  
  <pre><code>Index: FileOne.txt
  ===================================================================
  --- FileOne.txt (.../trunk)     (revision 31)
  +++ FileOne.txt (.../branches/Branch_1) (revision 34)
  @@ -1,3 +1,3 @@
   Test
  -1
   2
  +3
  </code></pre>
  
  <p>modified:</p>
  
  <pre><code>Index: FileTwo.txt
  ===================================================================
  --- FileTwo.txt (.../trunk)     (revision 31)
  +++ FileTwo.txt (.../branches/Branch_1) (revision 34)
  @@ -1,3 +1,3 @@
   Test
  -1
   2
  +3
  </code></pre>
  
  <p>Just an Idea, haven't done it yet.</p>