[PATCH 0 of 2 ] an optional format flag to force --pull on clone

Wagner Bruna wagner.bruna+mercurial at gmail.com
Fri Dec 9 11:57:30 CST 2011


This adds an optional 'pullonclone' format flag to force
--pull usage when cloning from the repository. It is intended
as a workaround for filesystems with poor hardlink support.

The first patch is needed to avoid a test failure: verify
assumes that repo.cancopy() == False means it's either a
non-local or a bundle repo, and aborts. I added a canverify()
method to work around it, although that doesn't look terribly
elegant to me.

An alternative implementation (or even a separate additional
flag) could change hg.copystore to act as if the source and
destination were always on different devices (this is
actually partially done on this series, to support the
unshare command). I chose replicating --pull instead because
it gives better feedback to the user: the clone command
output will be exactly the same as with --pull.

For the flag name, perhaps something like 'alwayspull' or
'forbidhardlinks' would be better; I have no strong
feelings about it. Also, I do not trust my English that
much, so bikesh^Wsuggestions about the documentation are
very welcome :-)

Regards,
Wagner


More information about the Mercurial-devel mailing list