relnotes/5.8
author Arun Kulshreshtha <akulshreshtha@janestreet.com>
Tue, 30 Aug 2022 15:29:55 -0400
changeset 49491 c6a1beba27e9
parent 47014 32b527417ba3
permissions -rw-r--r--
bisect: avoid copying ancestor list for non-merge commits During a bisection, hg needs to compute a list of all ancestors for every candidate commit. This is accomplished via a bottom-up traversal of the set of candidates, during which each revision's ancestor list is populated using the ancestor list of its parent(s). Previously, this involved copying the entire list, which could be very long in if the bisection range was large. To help improve this, we can observe that each candidate commit is visited exactly once, at which point its ancestor list is copied into its children's lists and then dropped. In the case of non-merge commits, a commit's ancestor list consists exactly of its parent's list plus itself. This means that we can trivially reuse the parent's existing list for one of its non-merge children, which avoids copying entirely if that commit is the parent's only child. This makes bisections over linear ranges of commits much faster. During some informal testing in the large publicly-available `mozilla-central` repository, this noticeably sped up bisections over large ranges of history: Setup: $ cd mozilla-central $ hg bisect --reset $ hg bisect --good 0 $ hg log -r tip -T '{rev}\n' 628417 Test: $ time hg bisect --bad tip --noupdate Before: real 3m35.927s user 3m35.553s sys 0m0.319s After: real 1m41.142s user 1m40.810s sys 0m0.285s
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
47014
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
     1
== New Features ==
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
     2
 
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
     3
 * `hg purge` is now a core command using `--confirm` by default.
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
     4
 
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
     5
 * The `rev-branch-cache` is now updated incrementally whenever changesets
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
     6
   are added.
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
     7
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
     8
 * The new options `experimental.bundlecompthreads` and
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
     9
   `experimental.bundlecompthreads.<engine>` can be used to instruct
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    10
   the compression engines for bundle operations to use multiple threads
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    11
   for compression. The default is single threaded operation. Currently
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    12
   only supported for zstd.
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    13
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    14
== Default Format Change ==
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    15
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    16
These changes affects newly created repositories (or new clone) done with
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    17
Mercurial 5.8.
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    18
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    19
  * The `ZSTD` compression will now be used by default for new repositories
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    20
    when available. This compression format was introduced in Mercurial 5.0,
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    21
    released in May 2019. See `hg help config.format.revlog-compression` for
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    22
    details.
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    23
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    24
  * Mercurial installation built with the Rust parts will now use the
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    25
    "persistent nodemap" feature by default. This feature was introduced in
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    26
    Mercurial 5.4 (May 2020). However Mercurial instalation built without the
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    27
    fast Rust implementation will refuse to interract with them by default.
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    28
    This restriction can be lifted through configuration.
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    29
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    30
    See `hg help config.format.use-persistent-nodemap` for details
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    31
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    32
== New Experimental Features ==
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    33
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    34
 * There's a new `diff.merge` config option to show the changes
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    35
    relative to an automerge for merge changesets. This makes it
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    36
    easier to detect and review manual changes performed in merge
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    37
    changesets. It is supported by `hg diff --change`, `hg log -p`
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    38
    `hg incoming -p`, and `hg outgoing -p` so far.
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    39
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    40
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    41
== Bug Fixes ==
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    42
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    43
 * gracefully recover from inconsistent persistent-nodemap data from disk.
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    44
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    45
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    46
== Backwards Compatibility Changes ==
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    47
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    48
 * In normal repositories, the first parent of a changeset is not null,
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    49
   unless both parents are null (like the first changeset). Some legacy
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    50
   repositories violate this condition. The revlog code will now
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    51
   silentely swap the parents if this condition is tested. This can
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    52
   change the output of `hg log` when explicitly asking for first or
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    53
   second parent. The changesets "nodeid" are not affected.
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    54
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    55
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    56
== Internal API Changes ==
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    57
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    58
 * `changelog.branchinfo` is deprecated and will be removed after 5.8.
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    59
   It is superseded by `changelogrevision.branchinfo`.
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    60
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    61
 * Callbacks for revlog.addgroup and the changelog._nodeduplicatecallback hook
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    62
   now get a revision number as argument instead of a node.
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    63
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    64
 * revlog.addrevision returns the revision number instead of the node.
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    65
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    66
 * `nodes.nullid` and related constants are being phased out as part of
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    67
   the deprecation of SHA1. Repository instances and related classes
32b527417ba3 relnotes: copy contents of "next" to "5.8" and clear "next"
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    68
   provide access via `nodeconstants` and in some cases `nullid` attributes.