This project is read-only.

Mercurial Source Control Plugin for MS Visual Studio

  • VisualHG indicates file status within the project files tree of MSVC
  • Tracks adding, moving and renaming of file actions
  • Give you dialogs for committing changes, viewing detailed status of files and history and many more. Using TortoiseHG as its backend
  • Everything directly from your workspace via context menu and a toolbar
  • Version 1.1.5 is compatible with MSVS 2005, MSVS 2008
  • Version 1.1.7 is compatible with MSVS 2010, MSVS 2011, MSVS 2013 and MSVS 2015
  • Support for Mercurial Subrepositories
  • Recogonize projects under version control that are not in the same folder as the solution
  • File status icon for renamed files
  • File state indicating tooltips
  • View per file branch label in file tooltip

See some screenshots

To learn more about Mercurial, TortoiseHG and VisualHG watch Rob Conery's excellent video tutorial

Contributions are most welcome! Contact me at

To get started working with VisualHG is very simple.

  1. (Deinstall prev Version of VisualHG).
  2. Download and install TortoiseHg and VisualHG. Or load from Visual Studio Extension Manager / Online Gallery.
  3. Open Visual Studio and go to Tools -> Options.
  4. In the options tree view, select Source Control. (You may need to click the Show all Settings checkbox)
  5. Select VisualHG from the drop down list, and click OK.
  6. Open your Mercurial based solution to see the plugin installed and determining your files' statuses.

Version History

  • Support for Visual Studio 2015

  • Support for Visual Studio 2010, 2011 and 2013
  • Switched to new installer format 'vsix'.

New Features
  • Display current branch name(s) in MSVS Main Frame
  • New option to disable context sensitive menues – becomes a bit slow in very huge projects
  • New option to disable out of studio file tracking (beta)
  • Track files which was moved across projects and mark as renamed
  • Support for Visual Studio 2011 Developer Preview

  • Diff compares to wrong version under some conditions
  • PendingChangesList - restore selection fixed
  • Track readded files
  • Adding selected files for Visual Studio 2010 SP1 throws an exception
  • Attempting to launch Repo Browser in VS causes Null Reference Exception
  • Add Selected Files" crashs Visual Studio 2010 SP1
  • Check Diff-Tool before running it, otherwise VS2010 crashes

1.1.2 + 1.1.3**
Compatibility update for TortoiseHG 2.0

New Features
  • Revert file command added
  • Annotate file command added
  • New Menus in CodeTab and CodeWindow
  • Menu structure reordered - seperate VisualHG popup menu added
  • External DiffTool option with Mask and variables for $(ProgramFiles),$(ProgramFiles (x86)),$(Base),$(Mine),$(BaseName) and $(MineName).
  • New Options page added for autoAddFiles and autoActivatePlugin and DiffTool Mask
  • New Commit command react on current selection and child files of selection.
  • Determine HG.exe directory from registry - no warstart required anymore
  • Setup improved - deinstalls previous version automatically
  • Some Subrepo bugs

(Uninstall previous version first)
New Features
  • SSC Binding : Make VisualHG automatically the active SCC controler for Mercurial solutions
  • Store solutions and open documents before invoke ssc commands like commit.
  • Direct 'File Diff' command added
  • Make files on QuerySaveFile writable to allow save
  • Determine copied files and display associated tool tip.
  • State icons for Website project files in 2010
  • File History command selection for special files fixed
  • Subrepo detection improved

1.0.9 bug fix release
  • 2010 specific only - VisualHG crashing on special files like Web References
  • VS2010 crashes with multiple repositories

  • View Branch Label in VS Solution Explorer
  • BugFix: root directory sorter returns 0 if lengths are equal to prevent ArgumentException

1.0.8d Compatibillity update
  • Solution not under Mercurial Source Control
  • Icons don't get updated on commit

1.0.8c bug fix release
  • #5 Behavior change - Removing versioned project link is no longer tracked as file delete event.
  • #7 Behavior change - 'Excluding' versioned file from Project is no longer tracked as file delete event.
  • #1 Fix: HG.exe frequently locked. Limited number of bytes of the command line parameter to max 2048.
  • Introduced a new threading terminology to get rid of spawning hg.exe processes in some cases.

1.0.8b next tiny bug fix release*
  • Fix: does not found hg root directory in some cases

1.0.8a tiny bug fix release
  • VisualStudio temp files disabled from tracking (~RFxxxxx.TMP and ve-xxxx.tmp). These files may lock HG.exe under some conditions. (e.g. if status query is running and MSCV removes files at the same moment).
  • Fixed multiple hg.exe processes spawning after opening project.

1.0.8 Subrepositories
  • Support for Mercurial Subrepositories implemented
  • Recogonize projects under version control that are not in the same folder as the solution
  • File status icon for renamed files implemented
  • File state indicating tooltips implemented

1.0.7 is a bug fix release. Upgrading from previous versions is recommended
  • Thread eating callback-routine fixed. Performance improvements whilst solution build task realized by suspending status updates.
  • Folder rename tracking was incomplete because the watcher was disabled for build performance stuff. Now I changed this behavior by suspending the status updates whilst rebuilding process.

Moved the project from to here. If you are looking for previous versions or BugTracker entries you will find it here.


* 338 'Case folding' tracking and handling removed from VisualHG. This is because Mercurial for Windows is no longer case sensitive.

New Features
  • 332 View history for a single file.

  • 338 visualhg-1.05.msi does not install (use 1.0.5a link)
  • 337 VS2008 Open Web Site - VisualHG functions do not work anymore
  • 336 Files added to project but ignored by .hgignore gets added to VCS
  • 335 No password prompt when doing a pull from synchronize command
  • 313 When opening a repository with Visual Studio, all files in this folder are being added to it automatically. (use ignore file to prevent files from automatically adding)


* Added Visual Studio 2005 support

  • Improved setup with some dialog elements
  • Glyph updates works now for all project types (not only C# and CPP)
  • Vista 64 Bit secured

  • Smarter icons for popup menus and glyphs
  • Status tracking and glyph updating improvements (internal).

  • Initial Version

Hi folks

I'm a fan of Mercurial source control system I want to use it for my own develoments. Unfortunately there was no MSVS Plugin found which works to my needs. So I decided to create my own one. It is based on Mercurial and TortoiseHg's HGTK library, which covers many of the UI components - thx for that cool stuff!! So, if you want to check out VisualHG, you have to install TortoiseHg first and then VisualHG. After that you will have a well working solution integrated into Windows Explorer and MSVS 2008.

Good Luck!

Last edited Jul 27, 2015 at 10:53 AM by BerndSchrader, version 49