开发者

How long does it take to check out an average program with mercurial?

开发者 https://www.devze.com 2023-04-12 18:46 出处:网络
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.

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 N
  • pull -r N2... pull -r NN for pulling parts of history while you'll not have full history
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号