share Mercurial repo's in user home directory

From: Dale Scott <dalescott_at_shaw.ca>
Date: Thu, 21 Oct 2021 23:09:15 UTC
This is not directly related to FreeBSD....  is it possible to share a Mercurial repository with remote users simply by putting it in a user directory and the remote users specifying the ssh protocol in their hg clone, pull, push... commands?

I successfully do this now with git for a small number of users. I created a new system user and put headless git repos in the new user's home directory, then added a public ssh key for each developer to the new user's authorized_keys file. Remote users access the git repos in the home directory by simply using the ssh syntax with git clone, pull and push (and authenticate using their private key).

Does this also work with Mercurial?

Thanks,
Dale