Repo specific extensions are applied to all registered repos in one workbench instance.
Created originally on Bitbucket by Anonymous
Suppose you have two repos registered in TortoiseHG workbench, A and B. Some extension is enabled in A, but not B. (I.e. it is specifically enabled in A/.hg/hgrc, not in B/.hg/hgrc).
Open A in workbench. The extension is enabled and works fine.
Now open B and you'll find that the extension is also enabled!
This is definitely an error. Repo specific settings, including enabling extensions, have a scope of that repo only, and should not be applied to any other repos.
This rule is respected in the non-workbench use of Tortoise. For example, if one performs commands in repos A and B (over the file explorer context menu, for example), the extension, enabled in A, is not enabled in B. This is the way it is supposed to be.
I speculate that the workbench is using one process, rather than forking a process for each command (though the command output would seem to indicate the latter). The Mercurial process does not unload extensions. That is, it does not look to see that in repo B the extension should not be enabled. So that means that the extensions enabled in one repo "pollute" all the other repos accessed in the same workbench.
The behavior is thus similar to hgweb running as a WSGI application: if one repo loads an extension it is enabled in all repos being served by that hgweb instance, until the process is killed. One difference, however: It is possible to disable the extension (ext=!); it remains loaded but is not used. I could not find anyway to disable the extension in the workbench. For example I tried adding "ext=!" to B/.hg/hgrc, but the extension remained enabled. I also tried adding this line to my Mercurial.ini, but again it remained enabled.
The only workaround I found is to start different instances of the workbench. However, since the list of registered repos is global, not instance-specific, the user is faced with the same list of repos he is working on in both instances. In one instance he dare not select certain repos and vice-versa. Not very comfortable! In the worst case (different sets of extensions in each repo), he has to have one workbench per repo and ignore all but one of the repos shown in that instance!