What is the purpose of the "Use pull protocol to copy metadata" hg clone option?
Didly Bom
didlybom at gmail.com
Wed May 26 13:57:47 UTC 2010
On Wed, May 26, 2010 at 9:44 AM, Adrian Buehlmann <adrian at cadifra.com>wrote:
> On 25.05.2010 18:33, Didly Bom wrote:
> > Hi,
> >
> > I'd like to understand the purpose of the "use pull protocol to copy
> > metadata" (i.e. "--pull") command line option of the "hg clone" command.
> >
> > In previous versions of Mercurial using this option was essential to be
> > able to clone repositories sitting on an SMB share on a LAN in a
> > reasonable amount of time. Is this still necessary? In which cases
> > should this option be used?
>
> I don't use mercurial with repositories on LAN shares myself, so I can't
> comment on that specific setup.
>
> But a local clone without --pull tries to employ hardlinking [1] if the
> filesystem supports it (for example, Windows on NTFS does), which
> results in files in the store being shared.
>
> There are situations where you don't want to have that done. Like for
> example making sure that cache-like data structures (like the
> .hg/store/fncache file) are rebuilt or you want to convert between
> different mercurial repository format. Or you just want to make sure the
> two repositories are absolutely independent (i.e. don't share files by
> using hard links).
>
> [1] http://en.wikipedia.org/wiki/Hard_link
>
Thank you Adrian.
Then it seems that there is some sort of problem or bug when not using the
-pull option when cloning from a windows network share on windows XP.
I have a repository which ocupies around 2 MB (including the .hg folders).
This repository is placed on a network drive, which I access through Windows
Explorer. If I clone it using the --pull option the clone takes around 10
seconds to finish. If I do not use that option the clone takes many minutes
(around 10 minutes or so)!
Perhaps mercurial is repeatedly trying to create hard links to an external
network drive (which is not possible) to every file in the external
repository?
In any case I can reproduce this problem 100% of the time. I've seen this
problem in all the PCs in which I've tried it (all running WindowsXP). I've
also seen it when cloning from repositories placed in different network
shares (on different servers).
Previously I did not know for sure the meaning of this --pull option, but
according to your explanation this does not seem to be the proper behaviour,
is it?
Cheers,
Didly
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20100526/1e1bba97/attachment.html>
More information about the Mercurial
mailing list