clone all the subrepos

Mads Kiilerich mads at kiilerich.com
Thu Jul 29 11:01:12 UTC 2010


On 07/29/2010 12:17 PM, Lester Caine wrote:
> I'm slowly getting things under control, and now have a 'superproject'
> which links all of the repos in a github 'master'.

github?

> But now I would like
> to be able simply to clone all of the subrepos. If I do them one at a
> time things are apparently working, but a full 'checkout' is 170 repo
> sections ...
>
> I'm sure there is someone who has a script for doing it, but shouldn't
> there be a clone all command?

All the subrepos will be cloned to the local repo/working directory when 
you update the outer repo to a revision where they are used. Obviously 
that assumes that you use the right absolute or relative paths.

There is however an issue with creating the initial clone on a remote 
(central) server. Perhaps you can use something like:

for s in $(cat .hgsub|cut -d= -f1); do
echo hg clone $s ssh://server/foo/$s;
done

/Mads



More information about the Mercurial mailing list