Fri, 26 Jun 2020 11:20:58 -0400 merge with stable
Augie Fackler <augie@google.com> [Fri, 26 Jun 2020 11:20:58 -0400] rev 45005
merge with stable
Thu, 25 Jun 2020 03:46:07 +0200 hgweb: encode WSGI environment like OS environment stable
Manuel Jacob <me@manueljacob.de> [Thu, 25 Jun 2020 03:46:07 +0200] rev 45004
hgweb: encode WSGI environment like OS environment Previously, the WSGI environment keys and values were encoded using latin-1. This resulted in a crash if a WSGI environment key or value could not be encoded using latin-1. On Unix, the OS environment is byte-based. Therefore we should do the reverse of what Python does for os.environ. On Windows, there’s no native byte-based OS environment. Therefore we should do the same as what mercurial.encoding does with the OS environment.
Thu, 25 Jun 2020 03:10:13 +0200 hgweb: deduplicate code stable
Manuel Jacob <me@manueljacob.de> [Thu, 25 Jun 2020 03:10:13 +0200] rev 45003
hgweb: deduplicate code A following patch will change the way keys and values are encoded. To reduce the diff, I’ve split off the uninteresting part.
Fri, 26 Jun 2020 09:37:34 +0200 curses: do not initialize LC_ALL to user settings (issue6358)
Manuel Jacob <me@manueljacob.de> [Fri, 26 Jun 2020 09:37:34 +0200] rev 45002
curses: do not initialize LC_ALL to user settings (issue6358) 701341f57ceb moved the setlocale() call to right before curses was used. This didn’t fully solve the problem it was supposed to solve (locale-dependent functions, like date formatting/parsing), but only postponed it. Initializing LC_CTYPE seems to be sufficient for curses to work correctly. Luckily this is already done at interpreter startup on modern Python versions and, since recently, by Mercurial in the pycompat module in all other cases.
Fri, 26 Jun 2020 04:07:50 +0200 compat: initialize LC_CTYPE locale on all Python versions and platforms
Manuel Jacob <me@manueljacob.de> [Fri, 26 Jun 2020 04:07:50 +0200] rev 45001
compat: initialize LC_CTYPE locale on all Python versions and platforms Previously, the LC_CTYPE locale was not initialized according to user settings on all Python versions (e.g. never on Python 2) and platforms (e.g. not on some Python < 3.8 on Windows). This broke e.g. non-ASCII filenames passed to the Subversion bindings on Python 2, resulting in error messages like "file:///tmp/a%C3%A4 does not look like a Subversion repository to libsvn version 1.14.0". The following command could be used to test this functionality. Adding it to the test suite would be pointless, as the locale is always set to "C" during test runs. @command(b'check_initial_codeset', norepo=True) def check_initial_codeset(ui): codeset1 = locale.nl_langinfo(locale.CODESET) locale.setlocale(locale.LC_ALL, '') codeset2 = locale.nl_langinfo(locale.CODESET) assert codeset1 == codeset2
Thu, 25 Jun 2020 10:32:51 -0700 merge with stable
Martin von Zweigbergk <martinvonz@google.com> [Thu, 25 Jun 2020 10:32:51 -0700] rev 45000
merge with stable
Wed, 24 Jun 2020 23:17:56 -0700 merge: don't grab wlock when merging in memory
Martin von Zweigbergk <martinvonz@google.com> [Wed, 24 Jun 2020 23:17:56 -0700] rev 44999
merge: don't grab wlock when merging in memory I noticed this because we have an internal extension that does an in-memory rebase while holding only a repo lock, which resulted in a developer warning about the working copy lock being taken after the repo lock. Differential Revision: https://phab.mercurial-scm.org/D8665
Wed, 24 Jun 2020 14:44:21 +0200 pycompat: use os.fsencode() to re-encode sys.argv
Manuel Jacob <me@manueljacob.de> [Wed, 24 Jun 2020 14:44:21 +0200] rev 44998
pycompat: use os.fsencode() to re-encode sys.argv Historically, the previous code made sense, as Py_EncodeLocale() and fs.fsencode() could possibly use different encodings. However, this is not the case anymore for Python 3.2, which uses the locale encoding as the filesystem encoding (this is not true for later Python versions, but see below). See https://vstinner.github.io/painful-history-python-filesystem-encoding.html for a source and more background information. Using os.fsencode() is safer, as the documentation for sys.argv says that it can be used to get the original bytes. When doing further changes, the Python developers will take care that this continues to work. One concrete case where os.fsencode() is more correct is when enabling Python's UTF-8 mode. Py_DecodeLocale() will use UTF-8 in this case. Our previous code would have encoded it using the locale encoding (which might be different), whereas os.fsencode() will encode it with UTF-8. Since we don’t claim to support the UTF-8 mode, this is not really a bug and the patch can go to the default branch. It might be a good idea to not commit this to the stable branch, as it could in theory introduce regressions.
Thu, 25 Jun 2020 22:40:04 +0900 merge with stable
Yuya Nishihara <yuya@tcha.org> [Thu, 25 Jun 2020 22:40:04 +0900] rev 44997
merge with stable
Fri, 05 Jun 2020 01:54:13 +0200 perf: make `hg perfwrite` more flexible
Manuel Jacob <me@manueljacob.de> [Fri, 05 Jun 2020 01:54:13 +0200] rev 44996
perf: make `hg perfwrite` more flexible The more flexible command was used recently while finding a solution for a buffering bug (eventually fixed in f9734b2d59cc (the changeset description uses a different benchmark)). In comparison to the previous version, the new version is much more flexible. While using it, the focus was on testing small writes. For this reason, by default it calls ui.write() 100 times with a single byte plus one newline byte, for 100 lines. To get the previous behavior, run `hg perfwrite --nlines=100000 --nitems=1 --item='Testing write performance' --batch-line`.
(0) -30000 -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 +3000 tip