using rsync instead of pull from remote, for speed?
Matt Mackall
mpm at selenic.com
Thu Jun 1 09:03:57 CDT 2006
On Thu, Jun 01, 2006 at 03:35:50PM +0200, Georg wrote:
> Hi,
>
> I tried some methods for cloning a repository from a remote (on the LAN)
> host to my laptop.
> Pull via ssh: took about 5 minutes, pull via NFS took 2:30, and rsync took
> 36 seconds. You imagine what I'd prefer :-)
Current clone is definitely tuned for WAN, and emphasises compression
over CPU usage. Local clone could be made much faster by copying
revlogs wholesale. But doing cp -a is also perfectly valid. So is cp
-al.
> Question: If I simply rsync a repository instead of using clone, can I then
> still use push/pull for transfering deltas between
> my local clone and the upstream original? Is there any magic that clone
> does, in addition to just copying it all over?
It avoids some races. If someone is doing a commit in the middle of
your rsync, you may see an inconsistent state. Be sure to sync
changelog.* and manifest.* before data/*. While the result might not
pass verify because it may have file revisions that aren't in any
changeset, a clone or pull from the result will.
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial
mailing list