Mercurial 5.7 (2021-01-29)#
This is an overview of the 5.7 release.
New Features#
There is a new config section for templates used by hg commands. It called
[command-templates]. Some existing config options have been deprecated in favor of config options in the new section. These are:ui.logtemplatetocommand-templates.log,ui.graphnodetemplatetocommand-templates.graphnode,ui.mergemarkertemplatetocommand-templates.mergemarker,ui.pre-merge-tool-output-templatetocommand-templates.pre-merge-tool-output.There is a new set of config options for the template used for the one-line commit summary displayed by various commands, such as
hg rebase. The main one iscommand-templates.oneline-summary. That can be overridden per command withcommand-templates.oneline-summary.<command>, where<command>can be e.g.rebase. As part of this effort, the default format fromhg rebasewas reorganized a bit.hg purgeis now a core command using--confirmby default.hg diffandhg extdiffnow support--from <rev>and--to <rev>arguments as clearer alternatives to-r <revs>.-r <revs>has been deprecated.The memory footprint per changeset during pull/unbundle operations has been further reduced.
There is a new internal merge tool called
internal:mergediff(can be set as the value for themergeconfig in the[ui]section). It resolves merges the same was asinternal:mergeandinternal:merge3, but it shows conflicts differently. Instead of showing 2 or 3 snapshots of the conflicting pieces of code, it shows one snapshot and a diff. This may be useful when at least one side of the conflict is similar to the base. The new marker style is also supported by “premerge” asmerge-tools.<tool>.premerge=keep-mergediff.External hooks are now called with
HGPLAIN=1preset. This has the side effect of ignoring aliases, templates, revsetaliases, and a few other config options in anyhgcommand spawned by the hook. The previous behavior can be restored by setting HGPLAINEXCEPT appropriately in the parent process. Seehg help environmentfor the list of items, and how to set it.The
branchmapcache is updated more intelligently and can be significantly faster for repositories with many branches and changesets.The
rev-branch-cacheis now updated incrementally whenever changesets are added.
New Experimental Features#
experimental.single-head-per-branch:public-changes-onlycan be used restrict the single head check to public revision. This is useful for overlay repository that have both a publishing and non-publishing view of the same storage.
Backwards Compatibility Changes#
--force-lockand--force-wlockoptions onhg debuglockcommand are renamed to--force-free-lockand--force-free-wlockrespectively.
Internal API Changes#
changelog.branchinfois deprecated and will be removed after 5.8. It is superseded bychangelogrevision.branchinfo.