Mon, 06 Jul 2020 17:44:25 +0200 pycompat: change users of pycompat.{stdin,stdout,stderr} to use procutil.std*
Manuel Jacob <me@manueljacob.de> [Mon, 06 Jul 2020 17:44:25 +0200] rev 45056
pycompat: change users of pycompat.{stdin,stdout,stderr} to use procutil.std* On Python 3, pycompat.{stdin,stdout,stderr} are usually block-buffered even if connected to a TTY. procutil.{stdin,stdout,stderr} provide consistent behavior across platforms and Python versions.
Mon, 06 Jul 2020 10:30:55 +0200 hgignore: add mypy cache files
Antoine Cezar <antoine.cezar@octobus.net> [Mon, 06 Jul 2020 10:30:55 +0200] rev 45055
hgignore: add mypy cache files Differential Revision: https://phab.mercurial-scm.org/D8692
Mon, 06 Jul 2020 14:30:13 +0200 revlog: avoid hard-coded hash sizes
Joerg Sonnenberger <joerg@bec.de> [Mon, 06 Jul 2020 14:30:13 +0200] rev 45054
revlog: avoid hard-coded hash sizes Differential Revision: https://phab.mercurial-scm.org/D8683
Fri, 03 Jul 2020 19:00:01 +0200 test: restore expected output in test-persistent-nodemap.t
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 03 Jul 2020 19:00:01 +0200] rev 45053
test: restore expected output in test-persistent-nodemap.t The merge 78cafd48b9b2 had a small error and wrongly dropped the output updated from one side of the merge. This changeset re-install it. Differential Revision: https://phab.mercurial-scm.org/D8678
Mon, 06 Jul 2020 09:30:26 +0200 heptapod-ci: build rhg before tests run
Antoine Cezar <antoine.cezar@octobus.net> [Mon, 06 Jul 2020 09:30:26 +0200] rev 45052
heptapod-ci: build rhg before tests run Differential Revision: https://phab.mercurial-scm.org/D8682
Tue, 07 Jul 2020 14:05:15 +0530 rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net> [Tue, 07 Jul 2020 14:05:15 +0530] rev 45051
rhg: add a limited `rhg root` subcommand Clap has been choosen for argument parsing for the following reasons: - it's a wildly used and maintained crate - it can deal with OS encoding making it suitable for any encoding - it supports nonambiguous prefix matching as already available in hg - it will soon allow for structopts-style declarative pattern instead of the currently used builder pattern Differential Revision: https://phab.mercurial-scm.org/D8613
Fri, 05 Jun 2020 09:01:35 +0200 rhg: add RootCommand using hg-core FindRoot operation to prepare `hg root`
Antoine Cezar <antoine.cezar@octobus.net> [Fri, 05 Jun 2020 09:01:35 +0200] rev 45050
rhg: add RootCommand using hg-core FindRoot operation to prepare `hg root` The println macro is not used to avoid string usage. Dealing only with bytes allows us to be compatible with any encoding and not just UTF8. Later on, format macro will be made to have more readable code. Differential Revision: https://phab.mercurial-scm.org/D8612
Mon, 06 Jul 2020 22:02:50 -0400 merge with stable
Augie Fackler <augie@google.com> [Mon, 06 Jul 2020 22:02:50 -0400] rev 45049
merge with stable
Sun, 05 Jul 2020 13:09:22 +0200 procutil: make mercurial.utils.procutil.stderr unbuffered
Manuel Jacob <me@manueljacob.de> [Sun, 05 Jul 2020 13:09:22 +0200] rev 45048
procutil: make mercurial.utils.procutil.stderr unbuffered For most Mercurial code, it doesn’t make a difference, as the ui object flushes stderr explicitly (after the change, we could get rid of the explicit flush). One example where it makes a observable difference is mercurial.util.timed(). Without the patch, the time is not immediately shown on Python 3. With the patch, it’s shown immediately on all Python versions and platforms.
Sun, 05 Jul 2020 13:05:06 +0200 tests: generalize common test case code in test-stdio.py
Manuel Jacob <me@manueljacob.de> [Sun, 05 Jul 2020 13:05:06 +0200] rev 45047
tests: generalize common test case code in test-stdio.py
Sat, 04 Jul 2020 11:41:39 +0200 procutil: make stdout line-buffered on Windows if connected to TTY
Manuel Jacob <me@manueljacob.de> [Sat, 04 Jul 2020 11:41:39 +0200] rev 45046
procutil: make stdout line-buffered on Windows if connected to TTY Windows doesn’t support line buffering. Previously, we worked around that by setting the stream unbuffered. Instead, we can use our own line buffering we already use on Python 3.
Sat, 04 Jul 2020 11:21:44 +0200 procutil: split import and reassignment
Manuel Jacob <me@manueljacob.de> [Sat, 04 Jul 2020 11:21:44 +0200] rev 45045
procutil: split import and reassignment Besides making the code clearer, it will reduce the diff in the next patch.
Sat, 04 Jul 2020 11:15:58 +0200 procutil: move assignments closer to reassignments
Manuel Jacob <me@manueljacob.de> [Sat, 04 Jul 2020 11:15:58 +0200] rev 45044
procutil: move assignments closer to reassignments Doing reassignments is an anti-pattern IMHO, but I see how it makes sense here. When first looking at this code after jumping here with ctags, I missed the fact that stdout was reassigned. To make the code clearer, the assignments should be as close as possible to the reassignments.
Sat, 04 Jul 2020 12:15:41 +0200 procutil: factor out conditional creation of LineBufferedWrapper
Manuel Jacob <me@manueljacob.de> [Sat, 04 Jul 2020 12:15:41 +0200] rev 45043
procutil: factor out conditional creation of LineBufferedWrapper At the same time, document the logic and generalize it to work on all Python versions.
Thu, 02 Jul 2020 04:37:18 +0200 procutil: define LineBufferedWrapper on all Python versions
Manuel Jacob <me@manueljacob.de> [Thu, 02 Jul 2020 04:37:18 +0200] rev 45042
procutil: define LineBufferedWrapper on all Python versions There’s nothing Python 3-only about LineBufferedWrapper. In the future, we may want to use it on Windows, to work around missing line-buffering support.
Sat, 04 Jul 2020 10:47:04 +0200 tests: add tests for buffering behavior of mercurial.utils.procutil.stdout
Manuel Jacob <me@manueljacob.de> [Sat, 04 Jul 2020 10:47:04 +0200] rev 45041
tests: add tests for buffering behavior of mercurial.utils.procutil.stdout
Thu, 02 Jul 2020 02:51:09 +0200 cleanup: use slightly more meaningful name for temporary variable
Manuel Jacob <me@manueljacob.de> [Thu, 02 Jul 2020 02:51:09 +0200] rev 45040
cleanup: use slightly more meaningful name for temporary variable Not that it makes a big difference, but using `p` instead of `x` is clearer to me.
Thu, 02 Jul 2020 02:46:15 +0200 cleanup: use any() instead of checking truthiness of temporary list
Manuel Jacob <me@manueljacob.de> [Thu, 02 Jul 2020 02:46:15 +0200] rev 45039
cleanup: use any() instead of checking truthiness of temporary list It was not immediately obvious to me, when first seeing this, why a list was created. It needed a second look to understand that the purpose was to check whether the condition is true for any of the parents. Using any() for that is clearer.
Fri, 03 Jul 2020 13:45:59 +0530 chg: suppress OSError in _restoreio() and add some logging (issue6330)
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 03 Jul 2020 13:45:59 +0530] rev 45038
chg: suppress OSError in _restoreio() and add some logging (issue6330) According to issue6330, running chg on heavy loaded systems can lead to following error: ``` Traceback (most recent call last): File "path-to-hg/mercurial/commandserver.py", line 650, in _acceptnewconnection self._runworker(conn) File "path-to-hg/mercurial/commandserver.py", line 701, in _runworker prereposetups=[self._reposetup], File "path-to-hg/mercurial/commandserver.py", line 470, in _serverequest sv.cleanup() File "path-to-hg/mercurial/chgserver.py", line 381, in cleanup self._restoreio() File "path-to-hg/mercurial/chgserver.py", line 444, in _restoreio os.dup2(fd, fp.fileno()) OSError: [Errno 16] Device or resource busy ``` [man dup2] indicates that, on Linux, EBUSY comes from a race condition between open() and dup2(). However it's not clear why open() race occurred for newfd=stdin/out/err. We suppress the OSError in _restoreio() since the forked worker process will finish anyway and add some logging. Thanks to Mitchell Plamann for a detailed bug description and Yuya Nishihara for suggesting the fix.
Thu, 02 Jul 2020 19:54:44 +0200 ui: fix Python 2.7 support for ui.timestamp-output
Joerg Sonnenberger <joerg@bec.de> [Thu, 02 Jul 2020 19:54:44 +0200] rev 45037
ui: fix Python 2.7 support for ui.timestamp-output Differential Revision: https://phab.mercurial-scm.org/D8675
Wed, 01 Jul 2020 14:28:12 -0400 merge with stable
Augie Fackler <augie@google.com> [Wed, 01 Jul 2020 14:28:12 -0400] rev 45036
merge with stable
Thu, 18 Jun 2020 15:13:38 +0200 ui: add option to timestamp status and diagnostic messages
Joerg Sonnenberger <joerg@bec.de> [Thu, 18 Jun 2020 15:13:38 +0200] rev 45035
ui: add option to timestamp status and diagnostic messages Differential Revision: https://phab.mercurial-scm.org/D8640
Mon, 29 Jun 2020 20:53:32 +0900 merge with stable
Yuya Nishihara <yuya@tcha.org> [Mon, 29 Jun 2020 20:53:32 +0900] rev 45034
merge with stable
Sun, 28 Jun 2020 17:52:29 +0200 compat: back out a25343d16ebe (initialize LC_CTYPE locale on all Python ...)
Manuel Jacob <me@manueljacob.de> [Sun, 28 Jun 2020 17:52:29 +0200] rev 45033
compat: back out a25343d16ebe (initialize LC_CTYPE locale on all Python ...) As Yuya Nishihara pointed out, setting LC_CTYPE changes the behavior of some str methods on Python 2.
Sun, 28 Jun 2020 17:49:14 +0200 curses: back out d2227d4c9e6b (do not initialize LC_ALL to user settings)
Manuel Jacob <me@manueljacob.de> [Sun, 28 Jun 2020 17:49:14 +0200] rev 45032
curses: back out d2227d4c9e6b (do not initialize LC_ALL to user settings) The changeset was based on a25343d16ebe, which will be backed out, too. Another fix for the problem will be resubmitted to the stable branch.
Thu, 25 Jun 2020 11:22:34 +0200 test: redirect stderr so warning messages don't change output (issue6237)
Julien Cristau <jcristau@debian.org> [Thu, 25 Jun 2020 11:22:34 +0200] rev 45031
test: redirect stderr so warning messages don't change output (issue6237) clone and commit race for the lock, and if commit has to wait more than a second it prints a warning to stderr. Since this is somewhat expected here, silence it. Differential Revision: https://phab.mercurial-scm.org/D8664
Thu, 25 Jun 2020 12:02:34 -0700 locks: expect repo lock, not wlock, when writing to .hg/strip-backup/
Martin von Zweigbergk <martinvonz@google.com> [Thu, 25 Jun 2020 12:02:34 -0700] rev 45030
locks: expect repo lock, not wlock, when writing to .hg/strip-backup/ There should be no need for a working copy lock when creating (or reading) bundles in `.hg/strip-backup/` since they don't affect the working copy. I noticed this because we have an extension that tries to strip some revisions while holding only a repo lock. I guess we have no such cases in core, which seems a bit surprising. Maybe we always take a wlock at a higher level so the working copy is not updated while the target commit is being stripped. Differential Revision: https://phab.mercurial-scm.org/D8666
Thu, 25 Jun 2020 13:37:56 -0700 graft: leverage cmdutil.check_incompatible_arguments() for --abort/--stop
Martin von Zweigbergk <martinvonz@google.com> [Thu, 25 Jun 2020 13:37:56 -0700] rev 45029
graft: leverage cmdutil.check_incompatible_arguments() for --abort/--stop Differential Revision: https://phab.mercurial-scm.org/D8669
Thu, 25 Jun 2020 13:29:05 -0700 graft: leverage cmdutil.check_incompatible_arguments() for --no-commit
Martin von Zweigbergk <martinvonz@google.com> [Thu, 25 Jun 2020 13:29:05 -0700] rev 45028
graft: leverage cmdutil.check_incompatible_arguments() for --no-commit Differential Revision: https://phab.mercurial-scm.org/D8668
Thu, 25 Jun 2020 13:27:37 -0700 graft: leverage cmdutil.check_at_most_one_arg() for --abort/--stop/--continue
Martin von Zweigbergk <martinvonz@google.com> [Thu, 25 Jun 2020 13:27:37 -0700] rev 45027
graft: leverage cmdutil.check_at_most_one_arg() for --abort/--stop/--continue Differential Revision: https://phab.mercurial-scm.org/D8667
Sat, 27 Jun 2020 21:45:20 -0400 version: sort extensions by name in verbose mode
Matt Harbison <matt_harbison@yahoo.com> [Sat, 27 Jun 2020 21:45:20 -0400] rev 45026
version: sort extensions by name in verbose mode External extensions can be assigned any name, but presumably most enabled extensions will be internal ones and having them sorted makes it easier to find specific ones if the list is long. The lists in `hg help extensions` are already sorted. Differential Revision: https://phab.mercurial-scm.org/D8671
Sat, 27 Jun 2020 20:19:41 +0200 crecord: stop trying to import wcurses
Manuel Jacob <me@manueljacob.de> [Sat, 27 Jun 2020 20:19:41 +0200] rev 45025
crecord: stop trying to import wcurses The original import of crecord in 2008 already said "I have no idea if wcurses works with crecord...". The last reference to a Python package called wcurses is https://web.archive.org/web/20101025073658/http://adamv.com/dev/python/curses/. However, the Python package from there is called "curses" and not "wcurses". I didn’t find any evidence that it ever worked.
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -32 +32 +50 +100 +300 +1000 +3000 tip