title: Reparenting in Mercurial: how does one bring two independent svn clones back together?
body: <p>Here's the situation: developer Foo created a hg repo from our svn repo.  Foo's hg repo was only a shallow clone of the trunk in svn (no svn branches, tags, etc. and the history was incomplete [about 100 changesets]).  Developer Bar did the same thing, but cloned the entire svn repo including the entire history, branches, tags, etc.  Both Foo and Bar have done branchy development on their repositories.</p>
  
  <p>There is a common SVN ancestor to both repositories, but each hg repo has a different version number for it.  I would like to reparent Foo's changes from the common ancestor onto Bar's repo.  Here's a diagram of what I'm looking for:</p>
  
  <p>Foo's repo:</p>
  
  <pre><code>C'-D'-E-F---G
         \   /
          H-I
  </code></pre>
  
  <p>Bar's repo:</p>
  
  <pre><code>...A-B-C-D-J-K---L
              \   /
               M-N
  </code></pre>
  
  <p>C,C' and D,D' have the same content, but different version numbers &amp; comments.</p>
  
  <p>The goal:</p>
  
  <pre><code>...A-B-C-D--E-F---G
            \  \   /
             \  H-I
              \
               J-K---L
                \   /
                 M-N
  </code></pre>
  
  <p>I've run out of ideas on how to make this happen.  I tried convert --splicemap splice.map [splice.map file contained E D] (didn't do anything).  Clone -f managed to get everything into one repo, but they appear to be independent trees.  After clone -f, I tried rebase --source E --dest D --detach, but it just crashed :(</p>
  
  <p>Ideas?</p>
  
  <p>I'm aware altering the history will invalidate anyone's clone of the repositories, this is not a problem in this case.  All users will be re-cloning from the result of this effort.</p>