What is the purpose of the "Use pull protocol to copy metadata" hg clone option?

Adrian Buehlmann adrian at cadifra.com
Tue Jun 1 10:08:21 UTC 2010


On 01.06.2010 10:29, Didly Bom wrote:
> On Mon, May 31, 2010 at 11:32 PM, Adrian Buehlmann <adrian at cadifra.com
> <mailto:adrian at cadifra.com>> wrote:
> 
> 
>     > Next step I propose is to wait until my mercurial patches [1] I sent
>     > make it into a nightly build of TortoiseHg-unstable (now waiting for
>     > Matt to pull them into the main mercurial repo), and then see if
>     that's
>     > any faster in your environment.
>     >
>     > Provided I don't forget to do so (I expect this to happen in a
>     couple of
>     > days), I'll send you an off-list email with the download-url for the
>     > installer for testing as soon as it's ready.
>     >
>     > [1] http://hg.intevation.org/mercurial/crew/rev/5593ff6d1e5a
>     >     http://hg.intevation.org/mercurial/crew/rev/97f6d2a02c1f
> 
>     Wow. That was fast (Thanks to Steve for building):
> 
>     Didly, can you please retry your use case with:
> 
>     tortoisehg-unstable-1.0.35025.35065-x86-84ae34e0-4136-4221-95a6-c2e21a841269.msi
> 
>     (or the respective x64 installer, if needed) as available from
> 
>     http://bitbucket.org/tortoisehg/thg-winbuild/downloads/
> 
>     Said installer installs:
> 
>     TortoiseHg 1.0.3+25-2b69814ba1bb, Mercurial 1.5.3+65-102d8eb5c890
> 
> 
> I just gave this a tray and this fixed the issue!  I performed several
> tests, with and without the pull flag and in all cases the clone time
> was aboug 18 seconds. For comparison I retimed the time that it takes to
> make a copy of the repository using windows explorer, and that took
> around 13 seconds.
> 
> So, Adrian, it seems that your small 5% performance improvement becomes
> a 1000% improvement under certain conditions! Awesome stuff! :-D

I was unable to reproduce your huge slowness of unpatched mercurial
here, that's why I saw only a small speed improvement.

I bet it needs a Windows 2008 server on the server end. We don't have
that here. And we don't clone from UNC shares anyway.

> Thanks a lot to all of you guys for tracking and fixing this issue. It
> was a pain having to tell novice Mercurial users that they had to use
> the --pull option when cloning a repository from the remote server. You
> guys rock! :-D

Good to hear my patches fixed your use case :-).

For most people, it seems it was just good enough to specify --pull in
that case. Which probably explains why no one cared much about it until
today. Most production setups probably use a http server or ssh anyway.

> BTW, will this make it into Mercurial 1.5.4?

Rather unlikely, Mercurial 1.5.4 is due today.

The fixes are in the unstable branch, so it will be released with 1.6.

> Didly
> 
> P.S.- Steve, if you still have a look at the WireShark traces that I
> recorded and see something that could explain the problem I would love
> to hear about it.
> 

I don't think it makes much sense to look at them. But of course I can't
tell what Steve wants to spend his time for :-)



More information about the Mercurial mailing list