Mercurial personal wishes

Bryan O'Sullivan bos at serpentine.com
Sat May 13 22:55:46 CDT 2006


On Sat, 2006-05-13 at 12:26 +0200, Jérôme Marant wrote:

> git implements an efficent way of exporting data through HTTP, called
> packed objects, that is, packing changesets together incrementaly.

> Wouldn't it be nice for hg to offer such a feature?

Packed objects are very similar to what Mercurial already does on disk
and over the network, so Mercurial essentially already offers this
feature.

If you want to do something that's more efficient than old-http but
doesn't require a CGI script on the server side, I'd suggest that you
write a small program that generates a collection of power-of-two-sized
bundle files.  In other words, bundle 0 contains the tip changeset,
bundle 1 two of its parents, bundle 2 four more parents, etc.

A client could then grab bundle 0 and see if it has the parent
changesets referenced.  If not, grab bundle 1 and see if, well, you get
the idea.  Eventually, you've grabbed enough bundles that you have
everything you need, and in the common case (nearly in sync) haven't
expended much extra wasted time or bandwidth.

This idea is not mine, by the way; I think Benoit or someone came up
with it, quite a while ago.

I think that hacking something like this up would take maybe a day.

	<b

-- 
Bryan O'Sullivan <bos at serpentine.com>



More information about the Mercurial mailing list