How can clone the mercurial repo with all history

元气小坏坏 提交于 2019-12-24 00:53:29

问题


I have the server with mercurial. Now i have the home computer where i am pushing all my repo to bitbucket account.

My Work server has all the revisions like 900 on them. Now i want to clone that repo with all those 900 revisions and then push them to bitbucket so that i can see all those 900 revisions in my bitbucket account.

Is this possible


回答1:


In short, yes. Mercurial is a distributed version control system, which means (amongst other things) that every clone contains by default the full repository history. Bitbucket 101 is an excellent place to start for the basics, as is HgInit.

For the clone home and then push method, you would do something like:

hg clone ssh://user@workserver/pathtorepo repo
cd repo
hg push ssh://hg@bitbucket.org/username/repo

To push to the Bitbucket, you'll need to have public key authentication set up (see Bitbucket 101), for the work server portion, public key authentication is nice, but may not be necessary if the server's policy allows for interactive authentication.

If you don't need a local copy, Bitbucket also offer the option to directly import (i.e. clone) from a third party repository. This will almost certainly be faster since the upstream speed on most residential Internet connections is rather slow.



来源:https://stackoverflow.com/questions/16482785/how-can-clone-the-mercurial-repo-with-all-history

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!