title: SVN how to resolve "local add, incoming add upon update" on a *folder*?
body: <p>Here is my scenario:</p>
  
  <p>Assume we have an SVN repo with the following content:
  myfolder
  myfolder\file.txt</p>
  
  <p>Now I create two checkouts of this repo, co1 and co2.</p>
  
  <p>In co1 we modify file.txt.
  In co2 we:</p>
  
  <ul>
  <li>svn delete myfolder</li>
  <li>svn commit</li>
  <li>Create a new folder named myfolder </li>
  <li>svn add myfolder</li>
  <li>svn commit</li>
  </ul>
  
  <p>Now if I attempt an update in co1 I get a tree conflict:</p>
  
  <pre><code>A  +  C myfolder &gt;   local edit, incoming delete upon update
  M  +    myfolder\file.txt
  </code></pre>
  
  <p>I want to keep myfolder and the modified file, so I resolve the tree conflict:</p>
  
  <pre><code>svn resolve --accept working folder
  </code></pre>
  
  <p>Now if I try to commit, I get "svn: Directory '/myfolder' is out of date". If I try to resolve this using svn up myfolder, I get a tree conflict again:</p>
  
  <pre><code>A  +  C folder &gt;   local add, incoming add upon update
  M  +    myfolder\file.txt
  </code></pre>
  
  <p>Okay, so we try svn resolve --accept working folder again. But we still can't commit, we get the same message that "svn: Directory '/myfolder' is out of date", if we do svn up myfolder, we get right back to the last tree conflict.</p>
  
  <p>What is the correct procedure to resolve this type of conflict (when we wish to keep myfolder and its changes)?</p>
  
  <p>EDIT: Windows cmd line script to illustrate:</p>
  
  <pre><code>rmdir /S /Q C:\svntest 
  mkdir C:\svntest
  
  cd C:\svntest
  
  svnadmin create repo
  
  svn co file:///c:/svntest/repo co1
  svn co file:///c:/svntest/repo co2
  
  cd co1
  mkdir folder
  echo content &gt; folder\file.txt
  svn add folder
  svn commit folder -m ""
  
  cd C:\svntest\co2
  svn up
  
  cd C:\svntest\co1
  svn del folder
  svn commit -m ""
  mkdir folder
  svn add folder
  svn commit -m ""
  
  cd C:\svntest\co2
  echo changed_content &gt; folder\file.txt
  svn up
  svn resolve --accept working folder
  svn commit -m ""
  
  svn up folder
  svn resolve --accept working folder
  svn commit -m ""
  </code></pre>
  
  <p>And here is the output of running that script (note the commit failures at the end):</p>
  
  <pre><code>C:\&gt;rmdir /S /Q C:\svntest  
  
  C:\&gt;mkdir C:\svntest 
  
  C:\&gt;cd C:\svntest 
  
  C:\svntest&gt;svnadmin create repo 
  
  C:\svntest&gt;svn co file:///c:/svntest/repo co1 
  Checked out revision 0.
  
  C:\svntest&gt;svn co file:///c:/svntest/repo co2 
  Checked out revision 0.
  
  C:\svntest&gt;cd co1 
  
  C:\svntest\co1&gt;mkdir folder 
  
  C:\svntest\co1&gt;echo content  1&gt;folder\file.txt 
  
  C:\svntest\co1&gt;svn add folder 
  A         folder
  A         folder\file.txt
  
  C:\svntest\co1&gt;svn commit folder -m "" 
  Adding         folder
  Adding         folder\file.txt
  Transmitting file data .
  Committed revision 1.
  
  C:\svntest\co1&gt;cd C:\svntest\co2 
  
  C:\svntest\co2&gt;svn up 
  A    folder
  A    folder\file.txt
  Updated to revision 1.
  
  C:\svntest\co2&gt;cd C:\svntest\co1 
  
  C:\svntest\co1&gt;svn del folder 
  D         folder\file.txt
  D         folder
  
  C:\svntest\co1&gt;svn commit -m "" 
  Deleting       folder
  
  Committed revision 2.
  
  C:\svntest\co1&gt;mkdir folder 
  
  C:\svntest\co1&gt;svn add folder 
  A         folder
  
  C:\svntest\co1&gt;svn commit -m "" 
  Adding         folder
  
  Committed revision 3.
  
  C:\svntest\co1&gt;cd C:\svntest\co2 
  
  C:\svntest\co2&gt;echo changed_content  1&gt;folder\file.txt 
  
  C:\svntest\co2&gt;svn up 
  C folder
  At revision 3.
  Summary of conflicts:
    Tree conflicts: 1
  
  C:\svntest\co2&gt;svn resolve --accept working folder 
  Resolved conflicted state of 'folder'
  
  C:\svntest\co2&gt;svn commit -m "" 
  Adding         folder
  svn: Commit failed (details follow):
  svn: Directory '/folder' is out of date
  
  C:\svntest\co2&gt;svn up folder 
     C folder
  At revision 3.
  Summary of conflicts:
    Tree conflicts: 1
  
  C:\svntest\co2&gt;svn resolve --accept working folder 
  Resolved conflicted state of 'folder'
  
  C:\svntest\co2&gt;svn commit -m "" 
  Adding         folder
  svn: Commit failed (details follow):
  svn: Directory '/folder' is out of date
  </code></pre>