What's new in Mercurial 3.9

What's new in Mercurial 3.9

Mercurial 3.9 was released on 1st of August, 2016, in keeping with their time-based release plan - There are 4 major releases in a year, and it's very easy to follow the release schedule from the original plan. So, without further ado, let's dive into the details.

Bookmark improvements

Mercurial 3.9 adds improvements to bookmark handling. The hg push -B command will abort the push if there is no active bookmark. Mercurial 3.8 added support to push the active bookmark by specifying hg push -B. Mercurial 3.9 adds an equivalent switch for the pull command, which is invocated using hg pull -B.

Another, perhaps bigger addition to bookmarks is the JournalExtension, which adds a new command: hg journal. The hg journal command allows users to view the previous positions of bookmarks and the working copy. In addition, the JournalExtension includes another command: backup that can be used to recover a commit if it's no longer in your repository. You can read more about the JournalExtension from Mercurial's official site.

Command execution failure hook

Another interesting addition is with Mercurial hooks. Now, whenever a command fails in Mercurial 3.9, a hook named fail-<command> is run. This allows interesting integration possibilities for both to the server side as well as to the client side.

Security enhancements

The connection security code and user configuration are refactored in Mercurial 3.9. The main purpose of the refactoring is to make Mercurial more secure by default, in addition to giving users control to opt in to a better security configuration. A good overview of the security enhancements is listed here.

Some highlights to mention are that Mercurial 3.9 requires a trusted CA certificate when connecting to new servers. The default TLS protocol is TLS 1.1+, but a fallback with a warning for TLS 1.0 is present. A host-based security configuration is possible and the preferred certificate fingerprint hash algorithm has been changed from SHA-1 to SHA-256. Some earlier options, such as disabling certificate validation have been removed.

Improvements

A Mercurial release wouldn't be a proper release without some performance improvements. Noticeable improvements include the hg diff command in addition to the cHg command server client, which was added in Mercurial 3.8.

The largefiles extension has various improvements. A local check has been added before performing a remote check, which improves the performance. A send statlfile remote calls will only be sent for nonexisting local files. In addition, cloning with largefiles no longer asks for the password twice.

Conclusion

Mercurial 3.9 delivers nice new additions this time, especially to the client and the security side. The JournalExtension, as well as other bookmark improvements, are worth trying out and putting to good use. The security improvements are also worth using.

For more in-depth insights on Mercurial 3.9, check out the official release notes and what's new pages.

If you are looking for an effective and free repository hosting for your Mercurial repositories, check out Deveo's cloud or on-premises services

Seamless software development.

Code management and collaboration platform with Git, Subversion, and Mercurial.

Sign up for free
comments powered by Disqus