After many years of using Mercurial, ns-3 migragted in December 2018 to using Git. Git is an open-source source code management tool that is available on a wide variety of platforms (windows, OSX, Linux, etc.).
ns-3 maintains Git information in its online manual.