Merging mercurial repositories

Arne Babenhauserheide arne_bab at web.de
Sun Apr 19 06:44:21 CDT 2009


Am Sonntag 19 April 2009 11:11:22 schrieb Dmitry Nezhevenko:
> What I want to get is to merge all of files to single repository. Ideally
> full history should be preserved in correct order. Any ideas, how to get
> this?

You mean you have 3 different repositories which you want to merge? 

If I'm not mistaken, the just convert extension should fit jst fine. Can you 
try it with a filemap to first change the paths to the files? 

For somerepo1 that could be

----- FILEMAP FILE ------
include "*"
rename . lib
----- /FILEMAP ------

hg convert somerepo1 somerepo1-lib

Then just pull -f them into your main repo. 

cd main
hg pull -f ../somerepo1-lib

To get correct date ordering, you can afterwards run 
"hg convert --datesort main main-ordered", but iirc that might result in a 
larger repo if you have many branches. 

Best wishes, 
Arne
-- 
-- Ein Würfel System: http://1w6.org - einfach saubere (Rollenspiel-) Regeln.
-- Infinite Hands: http://infinite-hands.draketo.de - singing a part of the 
history of free software.
-- My stuff: http://draketo.de - stories, songs, poems, programs and stuff :)

-- PGP/GnuPG: http://draketo.de/inhalt/ich/pubkey.txt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
Url : http://selenic.com/pipermail/mercurial/attachments/20090419/d0ed0747/attachment.pgp 


More information about the Mercurial mailing list