relnotes/5.7
author Arun Kulshreshtha <akulshreshtha@janestreet.com>
Tue, 30 Aug 2022 15:29:55 -0400
changeset 49491 c6a1beba27e9
parent 46494 d67732a4b58a
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

== New Features ==

 * There is a new config section for templates used by hg commands. It
   is called `[command-templates]`. Some existing config options have
   been deprecated in favor of config options in the new
   section. These are: `ui.logtemplate` to `command-templates.log`,
   `ui.graphnodetemplate` to `command-templates.graphnode`,
   `ui.mergemarkertemplate` to `command-templates.mergemarker`,
   `ui.pre-merge-tool-output-template` to
   `command-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 is `command-templates.oneline-summary`. That
   can be overridden per command with
   `command-templates.oneline-summary.<command>`, where `<command>`
   can be e.g. `rebase`. As part of this effort, the default format
   from `hg rebase` was reorganized a bit.

 * `hg purge` is now a core command using `--confirm` by default.

 * `hg diff` and `hg extdiff` now 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 the `merge` config in the `[ui]`
   section). It resolves merges the same was as `internal:merge` and
   `internal: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" as
   `merge-tools.<tool>.premerge=keep-mergediff`.

 * External hooks are now called with `HGPLAIN=1` preset.  This has the side
   effect of ignoring aliases, templates, revsetaliases, and a few other config
   options in any `hg` command spawned by the hook.  The previous behavior
   can be restored by setting HGPLAINEXCEPT appropriately in the parent process.
   See `hg help environment` for the list of items, and how to set it.

 * The `branchmap` cache is updated more intelligently and can be
   significantly faster for repositories with many branches and changesets.

 * The `rev-branch-cache` is now updated incrementally whenever changesets
   are added.


== New Experimental Features ==

* `experimental.single-head-per-branch:public-changes-only` can 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.


== Bug Fixes ==



== Backwards Compatibility Changes ==

 * `--force-lock` and `--force-wlock` options on `hg debuglock` command are
   renamed to `--force-free-lock` and `--force-free-wlock` respectively.


== Internal API Changes ==

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