I looked at the mercurial website, and I couldn't find a single link to the location of the mercurial source repository itself. Do you know where it might me?
Here is a link to the Source:
https://www.mercurial-scm.org/release/?M=D