Reputation: 67340
Is copying the .hg directory to another directory the same as cloning in Mercurial (using TortoiseHg although I think that's irrelevant) or does the cloning command in Mercurial do something special during that process?
Upvotes: 19
Views: 1891
Reputation: 78350
It's almost the same. Cloning does a few things different, none of which are required, but some of which are cool:
That last one is pretty cool. It means that if I have a 200GB repo and I do a clone -U src dest
I get a full clone that uses no diskspace at all! If I skip the -U
I get a working copy that takes up space, and as the two clones start to diverge the new one starts taking up space, but a basic clone -U
is instantaneous and disk-space-free on modern file systems. That's not true of a copy (which does work just fine too).
Upvotes: 30