How long does it take to check out an average program with mercurial?
I checked out this:
hg clone https://code.google.com/p/quake2-gwt-port/
and it took like 5 minutes. Is that normal? It hung up on "adding file changes" for most of the time.
(is this the right place to ask? if not, please migrate,开发者_运维问答 thanks!)
In case you are new to distributed version control - when you do the first check out (clone) from a remote repository it will clone not only the head but also all prior revisions leading up to it - you are effectively transferring the entire revision history that led to that head to your local machine. Having that local copy of the revision history is where the benefits of DVCSs lie - your local repository will become just as authoritative about the history of the project as the repository you cloned from.
This will mean that the first "clone" operation can take a long time. However, this is only a once-off operation. Subsequent pulls from the remote repository will be very fast as only the changes will be pulled.
5 minutes does sound like a long time. But it should be a once-off - even if you later check out a different branch or head from the same repository, it will only transfer packs that are different.
Time of clone depends not only from file-sizes, but from the size of history also (for long projects history is biggest part of repo)
If you want, you can split fist clone into a set of smaller operations
clone -r N1
for creating repo and cloning part of history before changeset Npull -r N2... pull -r NN
for pulling parts of history while you'll not have full history
精彩评论