[PATCH 2 of 2] subrepo: create subrepos using clone instead of pull

Martin Geisler mg at aragost.com
Mon May 9 10:21:26 CDT 2011


Matt Mackall <mpm at selenic.com> writes:

> On Fri, 2011-03-25 at 16:07 +0100, Martin Geisler wrote:
>> # HG changeset patch
>> # User Martin Geisler <mg at aragost.com>
>> # Date 1301064435 -3600
>> # Node ID d786036b749bc58d219b22039559480716bb5071
>> # Parent  a8019f68e1463d6b1d5406f5f22d17f9aa8c828c
>> subrepo: create subrepos using clone instead of pull
>> 
>> Subrepositories are currently always created empty and then filled
>> with data using pull. This is wasteful when you do an initial clone
>> since it means that no hardlinks are created for the subrepos.
>> 
>> This patch make the hgsubrepo._get method check for an empty subrepo
>> and in that case do a clone instead of a pull. This brings in the
>> same data while creating hardlinks when possible.
>
> This seems like a good idea to me.

I've pushed the patch to crew as ccb7240acf32. This should help people
with many trivial subrepo paths a lot.

-- 
Martin Geisler

aragost Trifork
Professional Mercurial support
http://mercurial.aragost.com/kick-start/


More information about the Mercurial-devel mailing list