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?
The official repository seems to sit at https://www.mercurial-scm.org/repo/hg/ or https://www.mercurial-scm.org/repo/hg-stable with different branches. More information is available at the Developer Repositories wiki page.
Both links are browsable online and can be cloned from:
hg clone https://www.mercurial-scm.org/repo/hg/
hg clone https://www.mercurial-scm.org/repo/hg-stable