如何在 Visual Studio 2010 中使用 Mercurial?
版本控制菜鸟警报
我已经将 Mercurial、TortoiseHg 和 VisualHG 安装到 Visual Studio 2010 中。我已在 Visual Studio 中将源代码管理设置为 Mercurial。
当我右键单击我的解决方案时,我已经在出现的上下文菜单中看到 HG 的按钮。
我现在的问题是,如何使这个版本控制工作发挥作用?看来我之前必须进行某种配置,因为当我单击“HG Status”时,它告诉我“解决方案不在 Mercurial 版本控制之下”。
谢谢
Version Control noob alert
I've already installed both Mercurial, TortoiseHg and VisualHG into Visual Studio 2010. I've set in Visual Studio my source control to Mercurial.
When I right click on my solution, I already see HG's buttons in the context menu that appears there.
My question now is, how do I make this version control thing work? It seems I'll have to make some kind of configuration before, as it tells me "Solution is not under Mercurial version control" when I click in "HG Status".
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
使用 tortoiseHG,您可以右键单击资源管理器窗口并执行
tortoiseHG ->在此处创建存储库
,它会为您运行hg init
。我相信目前无法从 VisualHG 运行hg init
。with tortoiseHG you can rightclick on an explorer window and do
tortoiseHG -> Create Repository Here
which runshg init
for you. I believe currently there is no way to runhg init
from visualHG.TekPub 有一个很好的免费视频,介绍如何将 Mercurial 与 TortoiseHG、VisualHG 和 VS 结合使用,并通过以下方式将存储库推送给公众代码丛。在其中,Rob Conery 展示了如何在 VS 解决方案中创建存储库以及如何使用提交、分支、合并等。
这对于具有 Subversion 背景的人来说尤其有用,因为他指出分支/合并/分叉并不Mercurial 中的挑战性正如众所周知的 Subversion 中一样具有挑战性。
YouTube 链接与其他链接一样已失效:
https://www.youtube.com/watch?v =HV8e1NQ-8gU
TekPub has a good free video for using Mercurial with TortoiseHG, VisualHG, and VS along with pushing the repository to the public via CodePlex. In it, Rob Conery shows how to create a repository in your VS solution and how to work with commits, branches, merging, etc.
It's especially good for those coming from a Subversion background because he points out how branches/merging/forking is not so challenging in Mercurial as it's been known to be in Subversion.
YouTube link as other link is dead:
https://www.youtube.com/watch?v=HV8e1NQ-8gU
不确定如何在 Visual Studio 中执行此操作,但从命令行执行此操作很容易。只是
退出 VS 并转到要置于源代码管理之下的项目根文件夹中的命令提示符,然后键入“hg init”。然后加载解决方案并验证 hg 是所选的源代码提供商。
Not sure how to do this within Visual Studio but it is easy to do from the command line. Just
exit VS and go to a command prompt at the root folder of the project(s) you want to put under source control and type "hg init". Then load the solution and verify that hg is the selected source code provider.