views:

729

answers:

2

I have a largish Mercurial repository that I've decided would be better as several smaller repositories. Is there a way that I can split the repository and have each piece retain its revision history?

+2  A: 

Just clone it and delete the unwanted stuff out of each copy.

That doesn't help. Every close still has full history, so the "too much stuff" will always be there in the ".hg" directory taking up space.
Ry4an
ah, you want the Stalinist revisionism form of version control. ;)http://en.wikipedia.org/wiki/Historical_revisionism_(negationism)
Jason S
+9  A: 

The best way to do this is using the 'convert' extension. You'll use mercurial and both source and destination type and then use a --filemap with entries like:

exclude path/you/do/not/want
rename path/you/do/want .

The rename is only necessary if you want to take the parts you're keeping and move them "higher" in the directory hierarchy.

Ry4an
This wont work: rename path/you/do/want /This will: rename path/you/do/want .This only applies if you are moving a path to the root.
Nathan Lee
Indeed, thanks, Nathan.
Ry4an
http://mercurial.selenic.com/wiki/ConvertExtension
Julian