如何克隆所有历史的汞回购 [英] How can clone the mercurial repo with all history

查看:96
本文介绍了如何克隆所有历史的汞回购的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的服务器上有mercurial.现在我有了家用计算机,我将所有回购推送到bitbucket帐户.

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

我的Work serve r具有所有的修订版本,例如900.现在,我想用所有900 revisions克隆该存储库,然后再将它们push克隆到bitbucket,以便我可以在我的bitbucket帐户中看到所有这900个修订.

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.

这可能吗

推荐答案

总之,是的. Mercurial是一个分布式版本控制系统,这意味着(除其他事项外)每个克隆默认都包含完整的存储库历史记录. Bitbucket 101 是一个入门的好地方, HgInit .

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.

对于克隆宿主然后是push方法,您将执行以下操作:

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

要推送到Bitbucket,您需要设置公共密钥身份验证(请参阅Bitbucket 101),对于工作服务器部分,公共密钥身份验证是不错的方法,但是如果服务器的策略允许进行交互,则可能没有必要身份验证.

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.

如果您不需要本地副本,Bitbucket还提供直接导入的选项(即克隆).几乎可以肯定这会更快,因为大多数住宅Internet连接的上行速度相当慢.

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.

这篇关于如何克隆所有历史的汞回购的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆