Using old-http and rsync for pull/push.
mpm at selenic.com
Thu Sep 29 13:09:06 CDT 2005
On Thu, Sep 29, 2005 at 10:04:55AM -0700, Rob Browning wrote:
> Matt Mackall <mpm at selenic.com> writes:
> >> Also, I noticed some old TODO diffs on the list that mentioned
> >> possible rsync:// support. Is anything like that still planned (or
> >> sftp://)?
> > The preferred method at this point for static servers is to upload
> > bundles.
> OK, thanks. I had apparently overlooked the earlier announcement. I
> read that thread and the docs, but I was still a little unsure about
> the common usage.
> What if you want to upload incremental changes? Is the expectation
> that you would just upload a sequence of bundles
> and any clients would just have to know which ones they needed to pull
> (unbundle) at any given time?
First let's take a look at how old-http works. It basically treats the
remote repo as local files that it can inspect at its leisure. For a
fresh pull of Mercurial, it will generate over 1800 http requests. If
the per-request overhead is just .5k, that alone is more data than is
in a bundle (a full Mercurial bundle is .8M). This can be improved a
fair amount, but it's still not going to be fast.
A subsequent pull with _no changes_ must grab the whole changelog
index (103k) to check for new changesets. Quite a bit can fit in a
bundle that size.
I think a single bundle makes sense for distributing whole projects
where the project is small. For larger projects, you can have two:
project-full.hg and project-this-week.hg.
For distributing just your changes to a project, a single bundle
Larger projects will obviously be better off with a proper web server.
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial