relnotes/6.2
author Manuel Jacob <me@manueljacob.de>
Mon, 11 Jul 2022 01:51:20 +0200
branchstable
changeset 49378 094a5fa3cf52
parent 49369 cf566b57107c
child 49475 f64261762f3d
permissions -rw-r--r--
procutil: make stream detection in make_line_buffered more correct and strict In make_line_buffered(), we don’t want to wrap the stream if we know that lines get flushed to the underlying raw stream already. Previously, the heuristic was too optimistic. It assumed that any stream which is not an instance of io.BufferedIOBase doesn’t need wrapping. However, there are buffered streams that aren’t instances of io.BufferedIOBase, like Mercurial’s own winstdout. The new logic is different in two ways: First, only for the check, if unwraps any combination of WriteAllWrapper and winstdout. Second, it skips wrapping the stream only if it is an instance of io.RawIOBase (or already wrapped). If it is an instance of io.BufferedIOBase, it gets wrapped. In any other case, the function raises an exception. This ensures that, if an unknown stream is passed or we add another wrapper in the future, we don’t wrap the stream if it’s already line buffered or not wrap the stream if it’s not line buffered. In fact, this was already helpful during development of this change. Without it, I possibly would have forgot that WriteAllWrapper needs to be ignored for the check, leading to unnecessary wrapping if stdout is unbuffered. The alternative would have been to always wrap unknown streams. However, I don’t think that anyone would benefit from being less strict. We can expect streams from the standard library to be subclassing either io.RawIOBase or io.BufferedIOBase, so running Mercurial in the standard way should not regress by this change. Py2exe might replace sys.stdout and sys.stderr, but that currently breaks Mercurial anyway and also these streams don’t claim to be interactive, so this function is not called for them.

= Mercurial 6.2rc0 =

'''This is the first release to support Python 3.6+ ''only'''''

== New Features ==
 * Introduce a way to auto-upgrade a repo for certain requirements (see `hg help config.format`)
 * filemerge: add support for partial conflict resolution by external tool
 * contrib: add a partial-merge tool for sorted lists (such as Python imports)
 * revlog: reorder p1 and p2 when p1 is null and p2 is not while respecting issue6528
 * rhg: add support for ignoring all extensions
 * completion: install completers to conventional locations
 * revert: ask user to confirm before tracking new file when interactive
 * Rust implementation now uses the new dirstate API
 * sslutil: be less strict about which ciphers are allowed when using --insecure
 * sslutil: support TLSV1_ALERT_PROTOCOL_VERSION reason code
 * absorb: make `--edit-lines` imply `--apply-changes`
 * diff: add help text to highlight the ability to do merge diffs
 * censor: make rhg fall back to python when encountering a censored node
 * clone: use better names for temp files
 * debuglock: make the command more useful in non-interactive mode
 * debugdeltachain: distinct between snapshot and other diffs
 * debugindex: rename to debugindex debug-revlog-index
 * Make debug-revlog-index give out more information
 * sparse: use the rust code even when sparse is present

== Bug Fixes ==
 * Python 3 bugfixes
 * Windows bugfixes
 * templates: make `firstline` filter not keep '\v', '\f' and similar
 * rhg: sort unsupported extensions in error message
 * Improve performance of all functions that extract the first line of a text
 * crecord: avoid duplicating lines when reverting noeol->eol change
 * Some config.path options are now discoverable via config
 * mail: don't complain about a multi-word email.method
 * bundlespec: do not overwrite bundlespec value with the config one
 * bundlespec: do not check for `-` in the params portion of the bundlespec
 * bundlespec: handle the presence of obsmarker part
 * sparse: start moving away from the global variable for detection of usage
 * rust-changelog: don't skip empty lines when iterating over changeset lines
 * narrow: support debugupgraderepo
 * bundle: quick fix to ludicrous performance penalty
 * followlines: don't put Unicode directly into the .js file (issue6559)
 * manifest: improve error message in case for tree manifest
 * revlog: use %d to format int instead of %lu (issue6565)
 * revlog: use appropriate format char for int ("i" instead of I")
 * worker: stop relying on garbage collection to release memoryview
 * worker: implement _blockingreader.readinto() (issue6444)
 * worker: avoid potential partial write of pickled data

== Backwards Compatibility Changes ==
 * '''Removed Python 2 support''': this includes a lot of cleanup in our codebase, automation, testing, etc.
 * debugindex: rename to debugindex debug-revlog-index

== Miscellaneous ==

 * Fix typos and add missing items from documentation
 * dirstate-tree: optimize HashMap lookups with raw_entry_mut
 * Rust dependencies have been upgraded
 * revlog: rank computation is done by Rust when available
 * Improve discovery test tooling
 * Audit the number of queries done in discovery
 * Improved .hgignore of the mercurial-devel repository itself
 * Improve test coverage of dirstate-v2
 * rust-requirements: allow loading repos with `bookmarksinstore` requirement
 * Various Rust refactorings to help with revlog management
 * Improve debugability of Rust structs
 * Improve unit testing of the Rust dirstatemap
 * Improve robustness of the Rust dirstatemap to corruption
 * Improve changelog-v2 upgrade system