[GSoC] Introduction - Shallow partial clone

Brendan Cully brendan at kublai.com
Thu Mar 27 13:09:44 CDT 2008


On Thursday, 27 March 2008 at 00:51, Eric M. Hopper wrote:
> On Thu, 2008-03-27 at 00:54 +0200, altanis at ceid.upatras.gr wrote:
> > Concerning partial cloning, I see that another applicant is already
> > interested in "horizontal" limits (ie cloning of the full history of
> > certain directories within the repository). However, I find "vertical"
> > limiting to be equally interesting (which is ironic, as the Audacious
> > repo, which I downloaded to test hg, took about half an hour to download,
> > and I really wished there was a way to download only the latest snapshots
> > :) ).
> 
> This is a really tricky problem.
> 
> Narrow clones can be done without getting into the inner data structures
> that make Mercurial go.  Mostly narrow clones are an exercise in playing
> games with the dirstate and being able to manage its relationship with
> the manifest.
> 
> But shallow clones require understanding revlogs really well.  It also
> requires understanding how the revlogs of individual files relate to the
> revlogs for the changelog and manifest.
> 
> I don't know who among us understands those best aside from Matt.  Chris
> Mason did the work for the new version of the revlog data structure and
> was the person who wrote the MQ extension.  I did the work
> (pre-revlog-ng) that allows MQ to strip out revisions or allows cloning
> and other operations to pull all changes for a specific revision instead
> of everything the other repository has.
> 
> I haven't been following Mercurial really closely for the past year or
> so so someone else may have done some significant revlog work and could
> help you.

Overlay repositories are also a start in this direction. In fact, I
have a few guarded patches at the end of the overlay patch queue that
add partial support for running an overlay repository without its
parent.

Unfortunately I have been too busy to maintain the overlay patches,
which no longer apply to the current tree. But I think they are still
worth looking at if you're interested in doing partial history. See
this link:

http://www.selenic.com/mercurial/wiki/index.cgi/OverlayRepository


More information about the Mercurial-devel mailing list