Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Mercurial 4.2 Released

22 views
Skip to first unread message

Gregory Szorc

unread,
May 2, 2017, 7:15:14 PM5/2/17
to dev-version-control
Mercurial 4.2 was released a few minutes ago. If you installed Mercurial
with pip, you can upgrade via `pip install --upgrade Mercurial` (this works
in MozillaBuild). 4.2 should make its way to MacPorts and Homebrew sometime
in the next several hours.

Full releases notes are available at [1] and more curated notes available
at [2].

The pager and color extensions have been moved to core Mercurial and are
now enabled by default. This should make the out-of-the-box experience
significantly nicer.

The file content view of the HTML interface now supports following the
history of lines. If you load a URL like
file/tip/dom/base/nsContentUtils.cpp and click on 2 lines, you can load a
page showing a list of changesets and corresponding diffs touching those
lines. Think of it as a multiple line version of annotate/blame that only
requires a single page load to see all relevant changes. This is insanely
useful for things like following the evolution of an entire function. If
you are the kind of person who spends a lot of time in the annotate/blame
interface, I think this feature will save you a lot of time. The feature is
still a bit young. So get in touch if you want to see improvements.

This new HTML interface won't be deployed to hg.mozilla.org until at least
May 15. Fortunately, Mercurial has a built-in HTTP server so you can use
the feature before then. Just run `hg serve` and navigate in your browser.

Speaking of following lines, there is also a followlines() revset function
that allows you to query for revisions touching a range of lines in a file.
See `hg help revset` for more.

There is a new status() fileset that allows you to query for files based on
simulated `hg status` between revisions. For example, to find all files
added between tags "4.1" and "4.2" you can do `hg files 'set:status("4.1",
"4.2", added())'`. Or you can find all files modified between revision 1000
and the current working directory that have CRLF line endings: `hg files
'set:status(1000, ., eol(dos))'`. See `hg help fileset` for more.

There are also some new config options, such as
commands.status.relative=true (so paths from `hg status` are relative to
the current directory) and commands.update.requiredest=true and
commands.rebase.requiredest=true to require a destination revision for `hg
update` and `hg rebase`, respectively.

Not documented because it is not yet stable is a new "show"
extension/command. `hg show work` is quite interesting: it displays a
concise view of all in-progress changesets. If you use `hg wip`, it is like
that. The feature should be improved significantly for the 4.3 release.

If you sheriff automation, you'll also be happy to hear that the annoying
"stream ended unexpectedly" error that appears on clients if there is a
network failure should hopefully be replaced by something more indicative
of the underlying failure.

Bug 1359641 [3] tracks getting everything at Mozilla compatible with and
running 4.2. As of a few hours ago, all extensions in version-control-tools
have been marked as compatible with 4.2. So things should "just work"
(assuming they have decent test coverage). File a blocking bug if you have
any issues.

[1] https://www.mercurial-scm.org/wiki/WhatsNew#Mercurial_4.2_.282017-5-2.29
[2] https://www.mercurial-scm.org/wiki/Release4.2
[3] https://bugzilla.mozilla.org/show_bug.cgi?id=1359641
0 new messages