Search code examples
visual-studiomercurialvisualhg

Is it possible to change the rate that VisualHg calls hg.exe?


I'm using VisualHg along with Visual Studio and TortoiseHg as part of my development workflow. Since installing VisualHg, I've noticed that TortoiseHg commands that update the repository have started having to wait for locks pretty frequently:

"waiting for lock on working directory of c:\src\AdPlatform held by 'cphillips-ttd:7300'"

I looked into process explorer and found that for every instance of Visual Studio I have open (usually 2-4), there is a constant set of new hg.exe processes coming and going. I assume that these are VisualHg checking the status of the repository, but the checks seem to be way more frequent than necessary.

Is there any way to slow these down or make them be linked to the "refresh" button in Visual Studio's solution explorer?


Solution

  • VisualHg currently has the "refresh status rate" hard coded at 300ms. You can see it in the StartDirectoryStatusChecker() method of HgStatus.cs.

    I've filed an issue for this problem in the VisualHg issue tracker.