Mercurial > hg
view relnotes/5.2 @ 48951:cf99c4af1079
chgserver: remove Python 2 file descriptor logic
Follows up 0bb28b7736bc "chgserver: remove Python 2 support code."
On Python 2, we had to close newfp prior to restoring the original file
description since "delete newfp" would otherwise close the file descriptor
shared with the long-lived fp:
in attachio():
newfp = os.fdopen(fp.fileno(), mode, bufsize)
in _restoreio():
newfp.close() # temporarily close newfp.fileno() (= fp.fileno())
os.dup2(fd, fp.fileno()) # reopen fp.fileno() with original fd
On the other hand, we shouldn't call newfp.close() on Python 3 since
any function calls are proxied to the underlying file object by
procutil.LineBufferedWrapper.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Fri, 04 Mar 2022 10:28:46 +0900 |
parents | a825ba8eb0a1 |
children |
line wrap: on
line source
== New Features == * The amend extension supports the `--currentuser` argument. * The amend extension supports the `--close-branch` argument. * The amend extension supports the `--secret` argument. * The uncommit extension supports the `rewrite.update-timestamp` config option. == New Experimental Features == == Bug Fixes == == Backwards Compatibility Changes == * A shell that supports `$(command)`` syntax for command substitution is now required for running the test suite. The test runner normally uses `sh`, so if that is a shell that doesn't support `$(command)` syntax, you can override it by setting `$HGTEST_SHELL` or by passing it to `run-tests.py --shell <shell>`. * The (experimental) narrow extension's wire protocol changed. If you're using it, you'll need to make sure to upgrade server and client at the same time. == Internal API Changes ==