Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use Mercurial from Visual Studio 2010?

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

like image 988
devoured elysium Avatar asked Jul 20 '10 02:07

devoured elysium


3 Answers

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.

like image 68
jk. Avatar answered Oct 13 '22 05:10

jk.


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

like image 30
dagilleland Avatar answered Oct 13 '22 05:10

dagilleland


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.

like image 34
David Lynch Avatar answered Oct 13 '22 05:10

David Lynch