Mercurial:将整个存储库发送给某人的推荐方式
我已经完成了一些编程,并使用 Mercurial 进行源代码控制。我现在需要将我的所有代码发送给其他人(因为他们将接管)。
由于 Mercurial 存储库的所有副本都是完整且真实的存储库,我的第一个想法是首先对我的存储库进行克隆而不进行更新,然后压缩并通过电子邮件发送该克隆。这是一个好方法,还是有更好的方法?
例如,当使用 TortoiseHg 存储库资源管理器时,我可以右键单击一个变更集,然后在“导出”下有各种选项,看起来它们可能正在做一些有趣的事情,但我不太理解它们或不知道要使用哪一个。
I have done some programming and I have used Mercurial for source control. I now need to send all of my code to someone else (because they are going to take over).
Since all copies of a mercurial repository is a full and real repository my first thought is to first do a clone of my repository without an update and then zipping and emailing that clone. Is this a good way, or is there a better way?
For example when using the TortoiseHg Repository Explorer I can right-click on a changeset and under Export there are various options that looks like they could be doing something interesting, but I don't quite understand them or know which one to use.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您所建议的内容可以正常工作,但您也可以使用
hg bundle
创建一个封装整个存储库的压缩副本的变更组文件(请参阅hg help bundle
了解更多信息)完整详细信息,或此页面:http://www.selenic.com/mercurial /hg.1.html#bundle)。在你的机器上:
然后将
my_repo.hg
发送给其他开发人员,他们可以直接从中克隆:(注意:这种假设你正在使用 Linux,但我想 TortoiseHg 支持类似的东西,因为这是 Mercurial 的基本功能)。
编辑:看起来使用 TortoiseHg 的等效方法是将一系列变更集导出为捆绑包(请参见此处:http://tortoisehg.bitbucket.io/manual/2.9/patches.html#export-patches)。在这种情况下,您想要选择第一个变更集一直到提示,然后导出为捆绑包。
What you've suggested will work fine, but you can also use
hg bundle
to create a changegroup file encapsulating a compressed copy of the entire repository (seehg help bundle
for the full details, or this page: http://www.selenic.com/mercurial/hg.1.html#bundle).On your machine:
Then send
my_repo.hg
off to the other developer, who can clone directly from that:(Note: this sort of assumes you're working with linux, but I imagine TortoiseHg supports something similar, since this is a basic feature of Mercurial).
EDIT: Looks like the equivalent using TortoiseHg would be to export a range of changesets as a bundle (see here: http://tortoisehg.bitbucket.io/manual/2.9/patches.html#export-patches). In this case, you want to select the very first changeset all the way up through the tip, and export as a bundle.
每个文件夹都是存储库的完整副本。只需发送整个文件夹,他们就会获得所需的一切。
或者,您可以克隆该文件夹的副本并将克隆发送给他们。这将使他们能够在将来需要时将更改推送给您。
Every folder is a complete copy of the repository. Simply send the entire folder and they will have everything they need.
Alternatively you can clone a copy of the folder and send them the clone. This would allow them to push changes back to you if needed in the future.