mercurial-server and hg extensions

Are you using mercurial-server for shared-ssh based hg hosting? Do you want to use extensions such as largefiles and projrc?

If so, you may be very familiar with the error message "ssh://hg@hostname/repo does not appear to be a largefile store".

I spent more time than I'd care to admit trying to fix this, and was unable to find documentation explaining how to fix it.

Well, here it is:

mercurial-server is setup to ignore system and user hgrc files. It'll use the system hg extensions (/etc/mercurial/hgrc.d/hgext.rc) when init'ing the repo, but not for other operations.

To enable extensions for mercurial-server you need to create a file in /etc/mercurial-server/remote-hgrc.d/ and add the extension list. For example I have a file /etc/mercurial-server/remote-hgrc.d/hgext.rc which contains the following:



...Yep. that's it. Easy times. Unfortunately the problem is being unable to find documentation explaining this; in the end I had to read through the source code. Hopefully this post has saved you the effort.