Installation and Setup
- Download and install TortoiseHg if not already installed.
- Download the run the VSIX package and open to install.
- Start Visual Studio and go to Tools | Options.
- Select Source Control in the tree view.
- Select HgVS from the drop down list, and click OK.
- If you did not install TortoiseHg to the default location, verify the paths in HgVS Options.
Creating an Hg Repository
- To create a new Hg repository, right click the project in the solution explorer and select menu HgVS: Add to Source Control.
- The file status is set as new.
Viewing Hg File Status
- Open Hg controlled projects in Visual Studio, HgVS displays the file status in Visual Studio’s solution explorer.
- To commit changes to the Hg repository, select menu VIEW | HgVS Explorer.
- Click the Go!-> Commit to enter the Commit page.
- New, modified, and deleted files are shown in the list. Select the files you want to commit. Add a comment message and click Commit.
- The file statuses are shown as being tracked by HgVS after committing.
- Amend a commit by clicking the Go!->Amend Last Commit.
- The last commit message can be modified. Select files to commit and click the “Amend Last Commit” button to Amend the commit.
- To switch branches, select menu VIEW | HgVS Explorer.
- Click Go!-> Switch Branch to enter the Switch Branch page.
- Select a branch.
- A summary of the changed files and the current branch name is shown.