1

I just installed the Mercurial Source Control Plugin (visualhg) for MS Visual Studio 2010 to try out some features of source control management systems.

When I clicked on the "Add Selected Files" command, VS2010 just crashed and the Windows Error Report program told me to relaunch VS2010. This happens every time I click on the "Add Selected Files" command and it is annoying.

Anyone got a solution?

kercker
  • 51

1 Answers1

0

Use the manual process:

The first step to setting up the integration is to create external tool entries for the various commands you’d like to launch from Visual Studio. Using the following steps, you’ll have one or more hg commands at your disposal.

  1. Go to “Tools -> External Tools” menu item.

  2. Click “Add”.

  3. Name the tool in the “Title” textbox. I’ve chosen “hg annotate”, “hg diff”, and “hg log”.

  4. In the “Command” textbox, put the path to TortoiseHg, typically “C:\Program Files\TortoiseHg\thg.exe”

  5. Fill out the proper arguments. The $(ItemPath) variable points to the current file. It’s good practice to surround the item in quotes, as you may have spaces in your path. Here are the various agruments for the commands I use:

    Annotate: annotate -n $(CurLine) “$(ItemPath)”

    Diff: vdiff “$(ItemPath)”

    Log: log “$(ItemPath)”

  6. Within “Initial Directory”, put a path within your repository. I’ve chosen $(ItemDir) for simplicity. You can also use $(SolutionDir) or one of the others. Check “Close on exit”, or you’ll end up with a pesky Command window left open. Note the position of your entry in the list (8th, etc). You’ll need to use it later.

  7. Repeat steps 2 through 7 for the various commands, and click “OK” to save.

References