view relnotes/5.8 @ 51580:b70628a9aa7e

phases: use revision number in new_heads All graph operations will be done using revision numbers, so passing nodes only means they will eventually get converted to revision numbers internally. As part of an effort to align the code on using revision number we make the `phases.newheads` function operated on revision number, taking them as input and using them in returns, instead of the node-id it used to consume and produce. This is part of multiple changesets effort to translate more part of the logic, but is done step by step to facilitate the identification of issue that might arise in mercurial core and extensions. To make the change simpler to handle for third party extensions, we also rename the function, using a more modern form. This will help detecting the different between the node-id version and the rev-num version. I also take this as an opportunity to add some comment about possible performance improvement for the future. They don't matter too much now, but they are worse exploring in a while.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 05 Apr 2024 11:33:47 +0200
parents 32b527417ba3
children
line wrap: on
line source

== New Features ==
 
 * `hg purge` is now a core command using `--confirm` by default.
 
 * The `rev-branch-cache` is now updated incrementally whenever changesets
   are added.

 * The new options `experimental.bundlecompthreads` and
   `experimental.bundlecompthreads.<engine>` can be used to instruct
   the compression engines for bundle operations to use multiple threads
   for compression. The default is single threaded operation. Currently
   only supported for zstd.

== Default Format Change ==

These changes affects newly created repositories (or new clone) done with
Mercurial 5.8.

  * The `ZSTD` compression will now be used by default for new repositories
    when available. This compression format was introduced in Mercurial 5.0,
    released in May 2019. See `hg help config.format.revlog-compression` for
    details.

  * Mercurial installation built with the Rust parts will now use the
    "persistent nodemap" feature by default. This feature was introduced in
    Mercurial 5.4 (May 2020). However Mercurial instalation built without the
    fast Rust implementation will refuse to interract with them by default.
    This restriction can be lifted through configuration.

    See `hg help config.format.use-persistent-nodemap` for details

== New Experimental Features ==

 * There's a new `diff.merge` config option to show the changes
    relative to an automerge for merge changesets. This makes it
    easier to detect and review manual changes performed in merge
    changesets. It is supported by `hg diff --change`, `hg log -p`
    `hg incoming -p`, and `hg outgoing -p` so far.


== Bug Fixes ==

 * gracefully recover from inconsistent persistent-nodemap data from disk.


== Backwards Compatibility Changes ==

 * In normal repositories, the first parent of a changeset is not null,
   unless both parents are null (like the first changeset). Some legacy
   repositories violate this condition. The revlog code will now
   silentely swap the parents if this condition is tested. This can
   change the output of `hg log` when explicitly asking for first or
   second parent. The changesets "nodeid" are not affected.


== Internal API Changes ==

 * `changelog.branchinfo` is deprecated and will be removed after 5.8.
   It is superseded by `changelogrevision.branchinfo`.

 * Callbacks for revlog.addgroup and the changelog._nodeduplicatecallback hook
   now get a revision number as argument instead of a node.

 * revlog.addrevision returns the revision number instead of the node.

 * `nodes.nullid` and related constants are being phased out as part of
   the deprecation of SHA1. Repository instances and related classes
   provide access via `nodeconstants` and in some cases `nullid` attributes.