title: How can I reduce the size of a hg subrepo without breaking links to the parent repo?
body: <p>I am trying to upload my repositories to Bitbucket. It's a parent repository and a handful of subrepos. One of the subrepos is so big (and my connection is throttled) that Bitbucket times out before it finishes the import. I am hopeful that if I make the subrepo small enough I will be able to upload it to Bitbucket and get the parent repo and subrepos workign from there.</p>
  
  <p>Unfortunately, using <code>hg convert</code> to make the subrepo smaller changes the revision numbers, and the parent repo won't let me use the URL for the smaller version of the subrepo in place of the old (larger) subrepo. Is there a way to make a repository smaller while maintaining compatibility with a parent repository?</p>
  
  <p>When I used <code>hg convert</code>, I removed the largest files (which are all older - and pre-date when I started using this repository as a subrepo) and got rid of some of the history from the subrepo. It worked well and dropped the size of the subrepo on my hard drive from 1.73GB to 328MB. Unfortunately, the parent repo won't switch to the new Bitbucket URL. It gives the error <em>abort: repository is unrelated</em>. The same thing happens when I go into the subrepo and try to edit its hgrc to point to the new URL. I thought the option <code>--config convert.hg.saverev=True</code> was supposed to enable clones of the original repository to utilize the new repository, but it has not worked so far.</p>
  
  <p>Here is the command I used to shrink the subrepo: <code>hg convert --filemap C:/Workspace/myFilemap.txt --config convert.hg.saverev=True --config convert.hg.startrev=acc85c96fe57e1ff1def298bdd6adb3c614d2a92 C:/Workspace/Original/subrepo C:/Workspace/NewRepos/SmallerSubRepo</code></p>
  
  <p>Any tips on how to fix the hg convert command, or how to use another approach to accomplish the same thing, would be appreciated.</p>