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.
Unfortunately, using hg convert
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?
When I used hg convert
, 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 abort: repository is unrelated. 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 --config convert.hg.saverev=True
was supposed to enable clones of the original repository to utilize the new repository, but it has not worked so far.
Here is the command I used to shrink the subrepo: 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
Any tips on how to fix the hg convert command, or how to use another approach to accomplish the same thing, would be appreciated.