Facebook is writing a Mercurial server in Rust. This is not a drill
Git, Go, Swift, pish – that's so last year, darling
Between Git and Mercurial, the two most popular distributed version control systems in use today for managing software development, Git gets most of the attention.
Git was created by Linus Torvalds, which gives it a pedigree. And it has benefited from the popularity of commercial services built around the technology, like GitHub. According to RhodeCode, a maker of code repository management software, Git accounted for 70 per cent of the search interest among the top five version control tools. Mercurial accounted for 13.5 per cent, tied with centralized version control system Subversion.
But some developers at Facebook appear to be reconsidering. In a post to a Mozilla discussion group about a Mercurial developers meeting in early October, Gregory Szorc, senior software engineer at Mozilla, recounts that Facebook reported a change in developers' attitudes about Mercurial.
"Initially, a lot of developers were skeptical about Mercurial and preferred Git," Szorc said. "Now, apparently a number of their developers have forgot how to use Git."
That may be overstating the case, since many of Facebook's Mercurial repositories are clones of Git repositories. But Facebook's preference for a monolithic code repository may explain its interest in Mercurial. Mercurial also has some advantages in terms of extensibility.
Facebook, Szorc observed, runs its own customized Mercurial distribution, so the developer experience may differ from standard distributions.
Szorc mentioned Facebook's work on Mercurial in terms of its relevance to technology of interest to Mozilla, such as the Rust programming language. Facebook, he said, is writing a Mercurial server in Rust. "It will be distributed and will support pluggable key-value stores for storage," he said, adding that the project could allow Mozilla to move its Mercurial repository at hg.mozilla.org to Amazon S3 or another compatible service.
Facebook also, by Szorc's account, has created an extension that caches blame lookups, requests for data about which revision and author last modified each line of a file. The extension accelerates lookups by 4x-10x, he said. It isn't likely to be made available before December, however.
Facebook demonstrated a feature called "hg absorb," which Szorc characterized as "probably the coolest workflow enhancement I've seen to version control in years."
The feature allows uncommitted modifications to a working directory to be folded into ancestor draft changesets.
"The command essentially looks at the lines that were modified, finds a changeset modifying those lines, and amends that changeset to include your uncommitted changes," Szorc explained. "If the changes can't be made without conflicts, they remain uncommitted. This workflow is insanely useful for things like applying review feedback."
What's more, Facebook, Google, and Unity, Szorc said, are working on virtual filesystems (FUSE) for Mercurial in order to make dealing with large numbers of files faster and to improve automated operations. He expects the addition of support for a new compression standard, Zstandard, will also improve the speed of operations when it appears in Mercurial 4.1.
Facebook did not respond to a request for comment. ®
Sponsored: Beyond the Data Frontier