Merging local repositories

Lars Kuhtz lars at exactcode.de
Wed Jul 23 08:58:02 CDT 2008


On Wednesday 23 July 2008 15:15, Nikolaus Demmel wrote:
> I use mercurial for local version-control. I have created 3
> repositories. One in /a/b/, one in /a/c/ and one in /a/ itsself
> (which includes /a/d/). How can I now merge the repositories in /a/b/
> and /a/c/ to the one in /a/, so that i'm left with only one
> repository and can commit all changes by calling $hg ci in /a/?

I am not sure what exactly it is, what you want. Maybe you want to do

cd /a
hg pull -f /a/b/
hg pull -f /a/c/
rm -rf b
rm -rf c

But be carefull about paths. Paths of files in b and c are then rooted at /a/ 
with the b/, c/ prefixes stripped. If this matters the convert extension 
might help you. The resulting repository will have three root revisions.

Regards,
Lars


More information about the Mercurial mailing list