Tue, 08 Dec 2020 10:51:05 -0500 extensions: avoid including `__index__` in the disabled extension list
Matt Harbison <matt_harbison@yahoo.com> [Tue, 08 Dec 2020 10:51:05 -0500] rev 46094
extensions: avoid including `__index__` in the disabled extension list This generated module contains a dictionary of all bundled extension names and their help for builds that cannot enumerate extensions in the filesystem. The disabled list gets displayed in `hg help extensions`, and is also used by `setup.py` to populate `__index__.py` when building. I haven't seen it sneak into either py2exe or PyOxidizer builds, but it does show up when running tests locally after having created an installer. Differential Revision: https://phab.mercurial-scm.org/D9544
Wed, 09 Dec 2020 18:21:16 -0500 windows: continue looking at `%HOME%` for user config files with py3.8+
Matt Harbison <matt_harbison@yahoo.com> [Wed, 09 Dec 2020 18:21:16 -0500] rev 46093
windows: continue looking at `%HOME%` for user config files with py3.8+ The `%HOME%` variable is explicitly called out in `hg help config` as a location that is consulted when reading user files, but python stopped looking at it when expanding '~' in py3.8+.[1] Restore that old functionality by copying in the old implementation (and simplifying it to just use bytes). It could be simplfied further, since only '~' is passed, but I'm not sure yet if we need to make this a generic utility function on Windows. There are other uses of `os.path.expanduser()`, but this is the only case I know of that documents `%HOME%` usage. (The reason for removing it was that it typically isn't set, but it actually is set in MSYS and PowerShell, and `%HOME%` and `%USERPROFILE%` are different in MSYS. I could be convinced to just replace all uses with this as a general utility, so we don't have to think too hard about BC.) [1] https://bugs.python.org/issue36264 Differential Revision: https://phab.mercurial-scm.org/D9559
Wed, 09 Dec 2020 15:50:59 -0500 run-tests: configure the environment to expand `~` properly with Windows py38+
Matt Harbison <matt_harbison@yahoo.com> [Wed, 09 Dec 2020 15:50:59 -0500] rev 46092
run-tests: configure the environment to expand `~` properly with Windows py38+ This was causing tests to point to the actual home path on the system, not the test defined one. Differential Revision: https://phab.mercurial-scm.org/D9558
Wed, 09 Dec 2020 12:57:40 -0500 run-tests: fix `HGTESTEXTRAEXTENSIONS` with py3
Matt Harbison <matt_harbison@yahoo.com> [Wed, 09 Dec 2020 12:57:40 -0500] rev 46091
run-tests: fix `HGTESTEXTRAEXTENSIONS` with py3 Since `extensions` was a str and `section` bytes, it never populated anything. If it had, it would have put bytes into the environment dictionary that is all str. As everything starts and ends as str, remove the incomplete attempt at byteification. It doesn't appear that we had any test coverage of this bit of code, so also add a non-extension config to make sure it is filtered out properly. Differential Revision: https://phab.mercurial-scm.org/D9557
Fri, 04 Dec 2020 17:27:10 +0100 rhg: use persistent nodemap when available
Simon Sapin <simon-commits@exyr.org> [Fri, 04 Dec 2020 17:27:10 +0100] rev 46090
rhg: use persistent nodemap when available … for node ID → revision number lookups, instead on linear scan in a revlog. Differential Revision: https://phab.mercurial-scm.org/D9520
Mon, 07 Dec 2020 18:06:53 +0100 persistent-nodemap: properly ignore non-existent `.nd` data file
Simon Sapin <simon-commits@exyr.org> [Mon, 07 Dec 2020 18:06:53 +0100] rev 46089
persistent-nodemap: properly ignore non-existent `.nd` data file This code was meant to handle the case of a nodemap docket file pointing to a nodemap data file that doesn’t exist (anymore), but most likely caused an `UnboundLocalError` exception instead when `data` was used on the next line without being defined. This case is theoretically possible with a race condition between two hg processes, but is hard to reproduce or test: * Process A reads a docket file and finds a UID in it that points to a given data file name. * Process B decides that this same data file needs compacting. It writes a new one with a different UID, overwrites the docket file, then removes the old data file. * Only then process A tries to a open a file that doesn’t exist anymore. Differential Revision: https://phab.mercurial-scm.org/D9533
Wed, 09 Dec 2020 18:51:52 -0800 docs: prefer `hg diff --from/--to` over `-r`
Martin von Zweigbergk <martinvonz@google.com> [Wed, 09 Dec 2020 18:51:52 -0800] rev 46088
docs: prefer `hg diff --from/--to` over `-r` This patch includes updating away from the broken `hg diff -r 'date(...)'` (see not in previous patch). Differential Revision: https://phab.mercurial-scm.org/D9555
Wed, 09 Dec 2020 18:31:19 -0800 diff: add --from and --to flags as clearer alternative to -r -r
Martin von Zweigbergk <martinvonz@google.com> [Wed, 09 Dec 2020 18:31:19 -0800] rev 46087
diff: add --from and --to flags as clearer alternative to -r -r I think it was mistake to let the `-r` flag accept two revisions in `hg diff` in 98633e60067c (Support for 0, 1, or 2 diff revs, 2005-05-07). The command clearly acts on two revisions and having a single flag to indicate which those are is unclear. It got worse when it started accepting revsets as input. This patch introduces `--from` and `--to` flags, each taking a single revision and each defaulting to the working copy. That means that `hg
Thu, 03 Dec 2020 17:18:49 +0530 commandserver: handle IOError related to flushing of streams
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 03 Dec 2020 17:18:49 +0530] rev 46086
commandserver: handle IOError related to flushing of streams After dispatch, without chg we have handling of flushing of streams and exception handling related to it. The exception handling part is important because there can be exceptions when flushing fout or ferr. One such case is in `test-basic.t` which was failing on python3+chg without this patch as this handling was missing from chg. Failure can be seen at https://foss.heptapod.net/octobus/mercurial-devel/-/jobs/128399 Honestly I am not sure which one of `chgserver.py` or `commandserver.py` the change should go in. Differential Revision: https://phab.mercurial-scm.org/D9517
Wed, 02 Dec 2020 14:27:45 +0530 tests: conditionalize output in test-ssh.t with chg+py3
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 02 Dec 2020 14:27:45 +0530] rev 46085
tests: conditionalize output in test-ssh.t with chg+py3 Because of our wrapping around sys.std* and python3 internal buffering, the output order changes. The change in order seems like harmless because just few lines above the same command is run which results in same output. This makes `test-ssh.t` works with --chg on python 3. Differential Revision: https://phab.mercurial-scm.org/D9502
(0) -30000 -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 +3000 tip