mrcrowl/vscode-hg

Only run hg for the working directory

Opened this issue · 1 comments

I noticed that on startup of vscode the Output for Hg had a bunch of hg root commands for directories that are under ../vendor. I also noticed that the same thing happens for other directories when opening files that are not in the working directory or workspace. I have several directories in my workspace, and only one of them uses hg. Is it possible to configure the extension to only run commands for a specified directory?

Examples:

hg root
abort: no repository found in '/var/www/html/extlib/vendor/swaggest' (.hg not found)!
hg root
abort: no repository found in '/var/www/html/extlib/vendor/symfony' (.hg not found)!
hg root
abort: no repository found in '/home/test.user/.vscode-server/data/Machine' (.hg not found)!

vscode Version: 1.48.0
extension Version: 1.7.1

Hi @Kurunato!

This is the default behavior of the extension, and it is consistent with Git's extension as well.
hg root shouldn't be expensive to run. Is it causing an issue?