Sat, 05 Dec 2020 23:35:55 +0100 singlehead: introduce option to restrict to public changes
Joerg Sonnenberger <joerg@bec.de> [Sat, 05 Dec 2020 23:35:55 +0100] rev 46096
singlehead: introduce option to restrict to public changes The new experimental.single-head-per-branch:public-changes-only option restricts the single-head-per-branch filter to public changesets. This is useful when serving one repository with different views as publishing and non-publishing repository. Differential Revision: https://phab.mercurial-scm.org/D9525
Thu, 03 Dec 2020 14:39:39 -0800 treemanifest: stop storing full path for each item in manifest._lazydirs
Kyle Lippincott <spectral@google.com> [Thu, 03 Dec 2020 14:39:39 -0800] rev 46095
treemanifest: stop storing full path for each item in manifest._lazydirs This information is obtainable, if needed, based on the lazydirs key (which is the entry name) and the manifest's `dir()` method. ### Performance This is actually both a memory and a performance improvement, but it's likely to be a very small one in most situations. In the pathological repo I've been using for testing other performance work I've done recently, this reduced the time for a rebase operation (rebasing two commits across a public-phase change that touches a sibling of one of my tracked directories where the common parent is massive (>>10k entries)): #### Before ``` Time (mean ± σ): 4.059 s ± 0.121 s [User: 0.9 ms, System: 0.6 ms] Range (min … max): 3.941 s … 4.352 s 10 runs ``` #### After ``` Time (mean ± σ): 3.707 s ± 0.060 s [User: 0.8 ms, System: 0.8 ms] Range (min … max): 3.648 s … 3.818 s 10 runs ``` Differential Revision: https://phab.mercurial-scm.org/D9553
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
(0) -30000 -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 +3000 tip