RFC: A mercurial pack extension

Mark Williamson mark.williamson at cl.cam.ac.uk
Mon Feb 18 10:38:47 CST 2008


> > Thank you!  It's nice that it's possible to package an entire repository
> > history in a bundle but a bit frustrating not to have a more brief way of
> > doing this (and of unpacking / cloning it later).
>
> Yes, I wanted to make it so easy (and obvious) that people wouldn't have
> the urge to use zip/tar and just use bundles.

Yep, a good goal I think.  Present support for full repo bundles isn't as 
full / logical as I expected...

> > > This extension is intended to be useful to users of static web hosting,
> > > ftp, IM, etc. or other situations where ssh or http are not
> > > appropriate/available, and distributing an entire directory tree would
> > > be inconvenient. There is a feature request/suggestion on the Mercurial
> > > wiki of allowing clone from a bundle. Also, I remember some issues on
> > > the mailing list with zip files and bundles were suggested but I had to
> > > hunt on the wiki to figure out how to get one that had all the
> > > changesets in it.
> >
> > I see your extension can automatically download bundles for you, which is
> > a nice improvement for enabling bundles as a "clone" source.  Is that
> > just over HTTP or can it use any other protocols?
>
> At this point, it's anything that python's urllib2 supports
> (file,http,ftp). I don't have an ftp server so I only was able to test it
> with file and http. If anyone wants to try it with ftp, that would be
> really great.

I knocked up a small patch to the core last night that auto-detects repository 
type between hg's intelligent http:// and the old static-http://.  This makes 
is possible to do "hg clone http://blah/blah.hg" and have it do the right 
thing.  I'm thinking that something like that could be used to automatically 
detect http vs static-http vs bundle and do the right thing on clone, 
automatically.

That way you can just pass users a URL and say "clone this" and it'll Just 
Work regardless of your hosting setup.

Cheers,
Mark

-- 
Push Me Pull You - Distributed SCM tool (http://www.cl.cam.ac.uk/~maw48/pmpu/)


More information about the Mercurial mailing list