I'm trying to create a shared hgrc file with common extensions for Mercurial, so my coworkers can get a consistent experience and find useful tools. Enabling extensions that don't ship with Mercurial, though, is causing issues.
My main repo's hgrc points to a source-controlled, shared .hgrc file:
\Repo.hg\hgrc
%include ..\tools\hg\dev.hgrc
The shared dev.hgrc then enables extensions we keep source-controlled:
\Repo\tools\hg\dev.hgrc
[extensions]
hgshelve=tools\hg\hgshelve\hgshelve.py
fold=tools\hg\hgfold\fold.py
The problem is those extensions are only found when hg is run from the root Repo directory. Running it from a subdirectory gives errors:
E:\Repo\src>hg
*** failed to import extension hgshelve from tools\hg\hgshelve\hgshelve.py: [Errno 2] No such file or directory
*** failed to import extension fold from tools\hg\hgfold\fold.py: [Errno 2] No such file or directory
I want to refer to the repository's root without relying on anything except the relative path structure.
I've looked in the manual, but don't see any repository relative path options there.
%include
directive.) – Vatican