How to use Mercurial from Visual Studio 2010?

蹲街弑〆低调 提交于 2019-12-22 04:08:12

问题


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


回答1:


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.




回答2:


with tortoiseHG you can rightclick on an explorer window and do tortoiseHG -> Create Repository Here which runs hg init for you. I believe currently there is no way to run hg init from visualHG.




回答3:


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



来源:https://stackoverflow.com/questions/3286531/how-to-use-mercurial-from-visual-studio-2010

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