What does HackerNews think of gecko-dev?
Read-only Git mirror of the Mercurial gecko repositories at https://hg.mozilla.org. How to contribute: https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
The repo is also mirrored on GitHub for convenience, though PRs are not accepted through GitHub: https://github.com/mozilla/gecko-dev
The build instructions start with a script (“mach bootstrap”) that will download and install all the blessed tools and SDKs needed to build: https://firefox-source-docs.mozilla.org/setup/index.html
Depending on your network and computer, it can be possible to download the source and compile and run your own Firefox build in less than 20 minutes.
Code search is here: https://searchfox.org/mozilla-central/ I’ve never seen a better search tool.
It’s become pretty straightforward to build in the past few years. You pretty much just need your system SDKs (which are listed), python, and git or hg (which is Python anyway!).
I promise you that you don’t need CI until you have a patch that works locally.
I think the monorepo workflows which Git isn't good at are things like branching, code review, and feature/version management. But there's no reason that Git should have to be slow just because a repository is large. It's more things like "merge commits don't scale in a monorepo", which I would agree with, but that's not related to the performance of the index data structure.
Sources are open:
Historically, I've heard from various sources that Mozilla may not work at the same pace as some of the large corporations do in upstreaming patches and releases to the code base. This has (according to what I have heard, which may simply rest on rumor/speculation/heresey, mind you) kept a lot of large entities from getting on board.
I've also heard that in building Quantum this is less of an issue, but their code base is a mess, and chromium's is incredibly well documented and clean by comparison.
Anecdotally, I would be inclined to agree with my second statement up front, after just browsing the two, but please compare for yourself
For the large number of files one https://code.facebook.com/posts/218678814984400/scaling-merc... is one source. There's some earlier discussion of the same issue at https://news.ycombinator.com/item?id=3549679 that goes into some technical details.
There has been some work on git since then to address some of those issues (e.g. see https://blogs.msdn.microsoft.com/bharry/2017/02/03/scaling-g... ) but it's not clear to me that it helped enough to catch up to where Mercurial is for large repos.
For large numbers of changesets, just try running "log" or "annnotate" on any file with a long history in git. I just did this simple experiment:
1) hg clone https://hg.mozilla.org/mozilla-central/
2) git clone https://github.com/mozilla/gecko-dev.git
3) (cd mozilla-central && time hg log dom/base/nsDocument.cpp)
4) (cd gecko-dev && time git log dom/base/nsDocument.cpp)
It's not quite apples to apples because the git repo there has some pre-mercurial CVS history in it. But note that I'm not even using --follow for git and the file _has_ been renamed after the mercurial repo starts, so git is actually finding fewer commits than mercurial is here.
Anyway, if I do the above log calls a few times to make sure the caches are warm, I end up seeing times in the 8s range for git and the 0.8s range (yes, 10x faster) for mercurial.
That all said, most repos do not have millions (or even hundreds of thousands) of changesets or files. So the scalability problems are not problems for most users of either VCS.