title: Moving a folder from one SVN repository to another
body: <p>I have a set of repositories with a structure similar to the following:</p>
  
  <pre><code>/Source
    /branches
    /tags
    /trunk
      /FolderP
      /FolderQ
      /FolderR
  
  /Target
    /branches
    /tags
    /trunk
      /External
        /Library1
        /Library2
        /Library3
      /Internal
        /FolderA
        /FolderB
        /FolderC
        /FolderX
        /FolderY
        /FolderZ
  </code></pre>
  
  <p>I would like to move the folders /Source/trunk/FolderP, /Source/trunk/FolderQ and /Source/trunk/FolderR to /Target/trunk/Internal such that:</p>
  
  <ul>
  <li>/Source/trunk/FolderP becomes /Target/trunk/Internal/FolderP</li>
  <li>/Source/trunk/FolderQ becomes /Target/trunk/Internal/FolderQ</li>
  <li>/Source/trunk/FolderR becomes /Target/trunk/Internal/FolderR</li>
  </ul>
  
  <p>I should then have the following repository structure:</p>
  
  <pre><code>/Target
    /branches
    /tags
    /trunk
      /External
        /Library1
        /Library2
        /Library3
      /Internal
        /FolderA
        /FolderB
        /FolderC
        /FolderP
        /FolderQ
        /FolderR
        /FolderX
        /FolderY
        /FolderZ
  </code></pre>
  
  <p>It is imperative that history be maintained during the move.</p>
  
  <p>I have looked at the following 2 questions asked previously which seem to be similar:</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/2337470/svn-move-single-directory-into-other-repository-with-history">SVN move single directory into other repository (with history)</a></li>
  <li><a href="https://stackoverflow.com/questions/417726/how-to-move-a-single-folder-from-one-subversion-repository-to-another-repository">How do I move a single folder from one Subversion repository to another repository?</a></li>
  </ul>
  
  <p>I haven't had much luck with the suggested solutions. Specifically, I get an error when I run the svndumpfilter command, which states that:</p>
  
  <pre><code>svndumpfilter: Invalid copy source path `/branches/name-of-a-branch/.../File.cs`
  </code></pre>
  
  <p>What's going on and how can I get around this problem?</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>One workaround that I am currently trying is to:</p>
  
  <ul>
  <li>Clone the /Source repository into another one called /Temp</li>
  <li>Delete the files and folders from /Temp which I do not need and checkin all changes</li>
  <li>Dump /Temp repository by calling "svnadmin dump X:\Repositories\Temp > X:\Dumps\Temp.dmp"</li>
  <li>Load Temp.dmp into /Target repository by calling "svnadmin load --parent-dir trunk\Internal\Temp X:\Repositories\Target &lt; X:\Dumps\Temp.dmp"</li>
  <li>Checkout/update /Target repository</li>
  <li>Use TortoiseSVN to move folders out of /Target/trunk/Internal/Temp/trunk/** up into /Target/trunk/Internal (by highlighting the ones I want in Windows Explorer, pressing Control+X and then changing folder to /Target/trunk/Internal and issuing the pasting with TortoiseSVN</li>
  </ul>
  
  <p>NB: The above assumes that svn is maintaining all repositories in X:\Repositories folder and one is using X:\Dumps folder as working folder.</p>
  
  <p>This will clobber revision numbers obviously, but will maintain history. Hopefully, your commit comments do not include references to revision numbers.</p>
  
  <p>Someone else has mentioned an svndumpfilter3 Python script, but I have never used Python and do not wish to learn to use Python, just for this.</p>