If the question is not clear enough, I will try to explain it:
I am wondering if you can add the extension code/script to your repository and enable it inside .hg/hgrc
with a relative path.
If possible, this should enable you to distribute extensions with the repositories, as long the extension "code" can run on each platform.
Some, question applies for git
.