Mon, 18 Apr 2022 14:20:58 -0400 git: un-byteify the `mode` argument for the builtin `open()`
Matt Harbison <matt_harbison@yahoo.com> [Mon, 18 Apr 2022 14:20:58 -0400] rev 49078
git: un-byteify the `mode` argument for the builtin `open()` I guess this was assuming `pycompat.open` was imported, but it's not here or elsewhere in the git extension. Differential Revision: https://phab.mercurial-scm.org/D12568
Mon, 18 Apr 2022 11:21:09 -0400 git: adapt to some recent dirstate API changes
Matt Harbison <matt_harbison@yahoo.com> [Mon, 18 Apr 2022 11:21:09 -0400] rev 49077
git: adapt to some recent dirstate API changes There are still old methods like add() and drop(). I don't see anything that looks equivalent, so there's likely more work to do. But this allows diff and commit to work again on the simple webpage repo for thg. Differential Revision: https://phab.mercurial-scm.org/D12567
Mon, 18 Apr 2022 11:15:29 -0400 idirstate: add missing get_entry() method
Matt Harbison <matt_harbison@yahoo.com> [Mon, 18 Apr 2022 11:15:29 -0400] rev 49076
idirstate: add missing get_entry() method Differential Revision: https://phab.mercurial-scm.org/D12566
Wed, 13 Apr 2022 15:02:01 -0400 windows: disable pager when packaged with py2exe
Matt Harbison <matt_harbison@yahoo.com> [Wed, 13 Apr 2022 15:02:01 -0400] rev 49075
windows: disable pager when packaged with py2exe With Windows and py3, all output that got directed to the pager was lost. It can be worked around by the user piping to `more`, but that's easy to forget, and can be dangerous if `hg diff` or similar incorrectly shows no changes. The problem appears to be the new WindowsConsoleIO in py3.6[1]. We've worked around it with PyOxidizer by setting the `Py_LegacyWindowsStdioFlag` interpreter option, and worked around it with `hg.bat` and `exewrapper.c` by internally setting `PYTHONLEGACYWINDOWSSTDIO=1`. Unfortunately, py2exe doesn't appear to be able to set the interpreter option, and somehow seems to also ignore the environment variable. The latter isn't a good fix anyway, since setting it in the environment would affect other python programs too. We can't install a global config for this because a config closer to the user (e.g. from before pager was turned on by default) can override it. [1] https://peps.python.org/pep-0528/ Differential Revision: https://phab.mercurial-scm.org/D12556
Wed, 13 Apr 2022 14:37:57 -0400 resourceutil: force filesystem access to resources when using py2exe
Matt Harbison <matt_harbison@yahoo.com> [Wed, 13 Apr 2022 14:37:57 -0400] rev 49074
resourceutil: force filesystem access to resources when using py2exe I don't know why it doesn't work, but it avoids this fatal error on startup: > hg debugshell Traceback (most recent call last): File "hg", line 58, in <module> File "mercurial\dispatch.pyc", line 143, in run File "mercurial\dispatch.pyc", line 232, in dispatch File "mercurial\dispatch.pyc", line 254, in _rundispatch File "mercurial\ui.pyc", line 316, in load File "mercurial\rcutil.pyc", line 98, in rccomponents File "mercurial\rcutil.pyc", line 68, in default_rc_resources File "mercurial\utils\resourceutil.pyc", line 102, in contents File "<frozen zipimport>", line 775, in contents AssertionError I assume the py2 version of py2exe never hit this because `importlib.resources` failed to import. Differential Revision: https://phab.mercurial-scm.org/D12554
Wed, 13 Apr 2022 14:25:13 -0400 setup: fix the py2exe logic to work with py3
Matt Harbison <matt_harbison@yahoo.com> [Wed, 13 Apr 2022 14:25:13 -0400] rev 49073
setup: fix the py2exe logic to work with py3 TortoiseHg still uses (the modernized) py2exe packaging, but the build was failing since `py2exe.Distribution` was removed. One thing to note is that later in this module, there's a hack to include `distutils` when building from a virtualenv. While `import distutils` works in `hg debugshell` when built with py2, it doesn't work in py3. I'm not sure why- I don't see it in `library.zip` either. It doesn't seem to break anything though. Differential Revision: https://phab.mercurial-scm.org/D12553
Wed, 13 Apr 2022 07:58:49 -0700 absorb: make `--edit-lines` imply `--apply-changes`
Martin von Zweigbergk <martinvonz@google.com> [Wed, 13 Apr 2022 07:58:49 -0700] rev 49072
absorb: make `--edit-lines` imply `--apply-changes` One of our users tried to use `hg absorb -e` but it seemed that it would only bring up the editor if there were no changes the command could automatically detect destination for. I spent probably half an hour debugging why it worked that way. I finally figured out that it does bring up the editor, but you have to answer "yes" to the "apply changes" prompt *first*. That seems very unintuitive. If the user wants to edit the changes, there seems to be little reason to present them with a prompt first, so let's have `-e/--edit-lines` imply `-a/--apply-changes`. All the tests using `-e` also already used `-a`. I changed them to rely on the implied `-a` so we get coverage of that. Differential Revision: https://phab.mercurial-scm.org/D12550
Wed, 13 Apr 2022 14:40:11 +0100 branchmap: add a test that shows bad interaction with strip
Arseniy Alekseyev <aalekseyev@janestreet.com> [Wed, 13 Apr 2022 14:40:11 +0100] rev 49071
branchmap: add a test that shows bad interaction with strip Differential Revision: https://phab.mercurial-scm.org/D12549
Tue, 12 Apr 2022 20:01:49 +0100 rhg: refactor to pass argv down, instead of caling args_os()
Arseniy Alekseyev <aalekseyev@janestreet.com> [Tue, 12 Apr 2022 20:01:49 +0100] rev 49070
rhg: refactor to pass argv down, instead of caling args_os() This refactoring makes it easy to patch some command-line preprocessing into rhg. We use this to support using rhg as a shebang interpreter, for example. Differential Revision: https://phab.mercurial-scm.org/D12543
Tue, 12 Apr 2022 19:40:37 +0100 narrow: support debugupgraderepo
Arseniy Alekseyev <aalekseyev@janestreet.com> [Tue, 12 Apr 2022 19:40:37 +0100] rev 49069
narrow: support debugupgraderepo Differential Revision: https://phab.mercurial-scm.org/D12542
Wed, 13 Apr 2022 14:46:22 -0400 procutil: avoid `+= None` when writing to full std{err,out} descriptor on py3 stable
Matt Harbison <matt_harbison@yahoo.com> [Wed, 13 Apr 2022 14:46:22 -0400] rev 49068
procutil: avoid `+= None` when writing to full std{err,out} descriptor on py3 The write function returns `None` if there was no room to write the given data[1]. I don't like that this is effectively an infinite loop if there's never any progress emptying the underlying buffer, but we're no worse off than before, and it fixes random stacktrace popups seen in the py3 build of TortoiseHg. [1] https://docs.python.org/3/library/io.html#io.RawIOBase.write Differential Revision: https://phab.mercurial-scm.org/D12555
Mon, 18 Apr 2022 20:45:38 -0700 amend: don't remove unselected removals from memctx stable
Martin von Zweigbergk <martinvonz@google.com> [Mon, 18 Apr 2022 20:45:38 -0700] rev 49067
amend: don't remove unselected removals from memctx When there are removed files in the working copy and they are not selected to be amended into the parent, the `filectxfn` we create for the `memctx` would still return `None` before this patch. That's clearly incorrect; we should return the `filectx` from the unamended commit. Somehow it seems to not matter much except for the case with copies stored in changesets. Thanks to Kyle Lippincott for doing all the debugging and identifying the fix for this issue. Differential Revision: https://phab.mercurial-scm.org/D12573
Mon, 18 Apr 2022 20:39:31 -0700 tests: demonstrate crash on partial amend with copies in changesets stable
Martin von Zweigbergk <martinvonz@google.com> [Mon, 18 Apr 2022 20:39:31 -0700] rev 49066
tests: demonstrate crash on partial amend with copies in changesets See the fix in the next patch for explanation. Differential Revision: https://phab.mercurial-scm.org/D12572
Tue, 05 Apr 2022 12:06:32 -0700 rust-revlog: add methods for getting parent revs and entries
Martin von Zweigbergk <martinvonz@google.com> [Tue, 05 Apr 2022 12:06:32 -0700] rev 49065
rust-revlog: add methods for getting parent revs and entries Differential Revision: https://phab.mercurial-scm.org/D12442
Tue, 05 Apr 2022 08:47:04 -0700 rust-changelog: start parsing changeset data
Martin von Zweigbergk <martinvonz@google.com> [Tue, 05 Apr 2022 08:47:04 -0700] rev 49064
rust-changelog: start parsing changeset data This patch makes `ChangelogRevisionData` do some coarse, line-level splitting of the changeset data into manifest node, user, timestamp, files list, and description. There are no (in-tree) users of these functions yet, but I've added tests to prevent regressions. We'll surely add callers at some point. Differential Revision: https://phab.mercurial-scm.org/D12439
Mon, 04 Apr 2022 23:27:16 -0700 rust-changelog: remove special parsing of empty changelog data for null rev
Martin von Zweigbergk <martinvonz@google.com> [Mon, 04 Apr 2022 23:27:16 -0700] rev 49063
rust-changelog: remove special parsing of empty changelog data for null rev For the null revision, `Revlog::get_rev_data()` will return an empty string (of bytes). We currently handle that case in `ChangelogRevisionData::manifest_node()`. However, it's going to be ugly to have special handling for the null revision for each future method on `ChangelogRevisionData`. This patch therefore restructures the code so we instead initialize the struct with valid data for the null revision. Differential Revision: https://phab.mercurial-scm.org/D12438
Thu, 31 Mar 2022 22:06:26 -0700 rust-changelog: don't skip empty lines when iterating over changeset lines
Martin von Zweigbergk <martinvonz@google.com> [Thu, 31 Mar 2022 22:06:26 -0700] rev 49062
rust-changelog: don't skip empty lines when iterating over changeset lines The first empty line in the changeset indicates the end of headers and beginning of description. Callers can't know figure out where that position is if empty lines are skipped. Differential Revision: https://phab.mercurial-scm.org/D12426
Thu, 31 Mar 2022 22:02:46 -0700 rust-requirements: allow loading repos with `bookmarksinstore` requirement
Martin von Zweigbergk <martinvonz@google.com> [Thu, 31 Mar 2022 22:02:46 -0700] rev 49061
rust-requirements: allow loading repos with `bookmarksinstore` requirement `rhg` does support bookmarks, so it can load repos with the `bookmarksinstore` requirement just as well as other repos. Differential Revision: https://phab.mercurial-scm.org/D12425
Wed, 13 Apr 2022 12:14:17 -0700 rebase: while rewriting desc hashes, ignore ambiguous prefix "hashes" stable
Kyle Lippincott <spectral@google.com> [Wed, 13 Apr 2022 12:14:17 -0700] rev 49060
rebase: while rewriting desc hashes, ignore ambiguous prefix "hashes" If a repo is sufficiently large, a six digit number "hash prefix" can somewhat easily reference an ambiguous hash prefix. Differential Revision: https://phab.mercurial-scm.org/D12552
Wed, 13 Apr 2022 13:15:33 -0700 tests: add test demonstrating issue with ambiguous has prefixes during rebase stable
Kyle Lippincott <spectral@google.com> [Wed, 13 Apr 2022 13:15:33 -0700] rev 49059
tests: add test demonstrating issue with ambiguous has prefixes during rebase Differential Revision: https://phab.mercurial-scm.org/D12551
Sat, 09 Apr 2022 14:43:30 +0200 test: accept another error message on lack of TLS client certificate
Julien Cristau <jcristau@debian.org> [Sat, 09 Apr 2022 14:43:30 +0200] rev 49058
test: accept another error message on lack of TLS client certificate Differential Revision: https://phab.mercurial-scm.org/D12492
Sat, 09 Apr 2022 14:41:55 +0200 sslutil: support TLSV1_ALERT_PROTOCOL_VERSION reason code
Julien Cristau <jcristau@debian.org> [Sat, 09 Apr 2022 14:41:55 +0200] rev 49057
sslutil: support TLSV1_ALERT_PROTOCOL_VERSION reason code It looks like python 3.10 returns a different reason code on protocol version mismatch. Differential Revision: https://phab.mercurial-scm.org/D12491
Sat, 09 Apr 2022 14:28:17 +0200 test: override default cipher selection when connecting to TLS 1.0/1.1 servers
Julien Cristau <jcristau@debian.org> [Sat, 09 Apr 2022 14:28:17 +0200] rev 49056
test: override default cipher selection when connecting to TLS 1.0/1.1 servers The default set of ciphers on python 3.10 is incompatible with old TLS versions. Differential Revision: https://phab.mercurial-scm.org/D12490
Sat, 09 Apr 2022 14:23:52 +0200 sslutil: be less strict about which ciphers are allowed when using --insecure
Julien Cristau <jcristau@debian.org> [Sat, 09 Apr 2022 14:23:52 +0200] rev 49055
sslutil: be less strict about which ciphers are allowed when using --insecure Python 3.10 restricted which ciphers are enabled by default, leading to no available ciphers for TLS < 1.2. When using the --insecure flag we allow old TLS, so also adjust the cipher list to give connections a chance to work. On the server side, also loosen the cipher selection in tests (when using the devel.serverexactprotocol option). Differential Revision: https://phab.mercurial-scm.org/D12489
Sat, 09 Apr 2022 14:15:32 +0200 sslutil: avoid deprecation warnings from python 3.10's ssl module
Julien Cristau <jcristau@debian.org> [Sat, 09 Apr 2022 14:15:32 +0200] rev 49054
sslutil: avoid deprecation warnings from python 3.10's ssl module Use ssl.PROTOCOL_TLS_{CLIENT,SERVER} and SSLContext.{min,max}imum_version when supported (3.7+). And, catch deprecation warnings when the user asks for deprecated TLS versions (1.0 and 1.1). Differential Revision: https://phab.mercurial-scm.org/D12488
Wed, 06 Apr 2022 22:29:49 +0200 zeroconf: fix deprecation warning with python 3.10
Julien Cristau <jcristau@debian.org> [Wed, 06 Apr 2022 22:29:49 +0200] rev 49053
zeroconf: fix deprecation warning with python 3.10 threading.condition.notifyAll → threading.condition.notify_all Differential Revision: https://phab.mercurial-scm.org/D12487
Mon, 11 Apr 2022 11:14:55 +0200 test: deal with changed error message on python 3.10
Julien Cristau <jcristau@debian.org> [Mon, 11 Apr 2022 11:14:55 +0200] rev 49052
test: deal with changed error message on python 3.10 Differential Revision: https://phab.mercurial-scm.org/D12493
Mon, 02 Dec 2019 14:45:00 +0100 mail: don't complain about a multi-word email.method
Julien Cristau <jcristau@debian.org> [Mon, 02 Dec 2019 14:45:00 +0100] rev 49051
mail: don't complain about a multi-word email.method I want to be able to set email.method to "ssh relay /usr/sbin/sendmail" without needing an extra trivial shell script. This works fine since we pass the full command to a shell, except for validateconfig trying to find it in $PATH. Differential Revision: https://phab.mercurial-scm.org/D7542
Thu, 07 Apr 2022 15:53:48 +0200 help: set the large-file-limit to 10MB stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 07 Apr 2022 15:53:48 +0200] rev 49050
help: set the large-file-limit to 10MB This is a minor increase (5%) and makes the doc much clearer. Differential Revision: https://phab.mercurial-scm.org/D12484
Thu, 07 Apr 2022 15:46:07 +0200 help: clarify the unit of `ui.large-file-limit` config stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 07 Apr 2022 15:46:07 +0200] rev 49049
help: clarify the unit of `ui.large-file-limit` config Its might be a bit confusing, especially since `large-file.min-size` uses MB. Differential Revision: https://phab.mercurial-scm.org/D12483
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -30 +30 +50 +100 +300 +1000 tip