Thu, 20 May 2021 14:20:39 -0400 tests: monkeypatch `util.get_password()` to avoid deadlocks on Windows stable
Matt Harbison <matt_harbison@yahoo.com> [Thu, 20 May 2021 14:20:39 -0400] rev 47046
tests: monkeypatch `util.get_password()` to avoid deadlocks on Windows This should have been part of 5b3513177f2b. Differential Revision: https://phab.mercurial-scm.org/D10759
Tue, 04 May 2021 10:46:50 +0200 rust-status: fix ignore and include not composing (issue6514) stable
Raphaël Gomès <rgomes@octobus.net> [Tue, 04 May 2021 10:46:50 +0200] rev 47045
rust-status: fix ignore and include not composing (issue6514) While the fix is pretty simple, the overall dispatch logic has become kind of ugly. Thankfully we're currently upstreaming a better algorithm, this code is temporary anyway. Differential Revision: https://phab.mercurial-scm.org/D10639
Tue, 04 May 2021 10:33:36 +0200 rust-status: highlight a bug in Rust-augmented status stable
Raphaël Gomès <rgomes@octobus.net> [Tue, 04 May 2021 10:33:36 +0200] rev 47044
rust-status: highlight a bug in Rust-augmented status This was reported in issue6514, confirmed with this test reproduction. This will be fixed with the next changeset. Differential Revision: https://phab.mercurial-scm.org/D10638
Fri, 07 May 2021 10:39:58 +0200 cache: avoid warming the fnodetags cache after clone stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 07 May 2021 10:39:58 +0200] rev 47043
cache: avoid warming the fnodetags cache after clone That cache can quite expensive to compute on large repository as not that `hg clone` is warming all cache, this can introduces a significant slowdown for clone time[1]. As a stop gap measure introduce a quick fix for that on stable, skipping the fnodetags cache post-clone. [1] https://www.mercurial-scm.org/pipermail/mercurial/2021-April/052679.html Differential Revision: https://phab.mercurial-scm.org/D10695
Wed, 05 May 2021 17:47:30 -0400 run-tests: fix whitelist/blacklist with directories on Windows stable
Matt Harbison <matt_harbison@yahoo.com> [Wed, 05 May 2021 17:47:30 -0400] rev 47042
run-tests: fix whitelist/blacklist with directories on Windows The file name is resolved with `os.path.relpath()` in the `Test` constructor, which yields `\` on Windows. That doesn't match the `/` separator when using MSYS tools to build the list, and it isn't obvious that this is the problem because directory separators can mostly be used interchangeably. The `--test-list` argument already seems to be properly handled.
Thu, 11 Mar 2021 23:20:41 -0500 run-tests: ignore PermissionError when checking available ports stable
Matt Harbison <matt_harbison@yahoo.com> [Thu, 11 Mar 2021 23:20:41 -0500] rev 47041
run-tests: ignore PermissionError when checking available ports I'm not sure what this is, but I'm getting it occasionally when running in WSL. When it was raised, none of the tests could run.
Mon, 12 Apr 2021 20:58:19 -0400 heptapod-ci: enable pytype checking stable
Matt Harbison <matt_harbison@yahoo.com> [Mon, 12 Apr 2021 20:58:19 -0400] rev 47040
heptapod-ci: enable pytype checking The trigger is manual for now, until we get a better idea about stability, resource usage, etc. Differential Revision: https://phab.mercurial-scm.org/D10462
Thu, 06 May 2021 18:40:23 -0400 hghave: fix the definition of `python3` to work on Windows stable
Matt Harbison <matt_harbison@yahoo.com> [Thu, 06 May 2021 18:40:23 -0400] rev 47039
hghave: fix the definition of `python3` to work on Windows Both py2 and py3 executables are named `python.exe`, and may or may not be on PATH. So use the dispatcher executable that comes with py3 to fetch the version of the latest py3 executable. This allows at least one relnotes test to run on Windows. Differential Revision: https://phab.mercurial-scm.org/D10694
Wed, 12 May 2021 12:41:52 -0400 util: avoid echoing the password to the console on Windows py3 (issue6446) stable
Matt Harbison <matt_harbison@yahoo.com> [Wed, 12 May 2021 12:41:52 -0400] rev 47038
util: avoid echoing the password to the console on Windows py3 (issue6446) The `getpass.getpass()` implementation on Windows first checks if `sys.stdin` and `sys.__stdin__` are the same object. It's not on py3 because the former is replaced in dispatch.py with something that doesn't normalize '\n' to '\r\n'. When they aren't the same object, it simply calls `sys.stdin.readline()` instead of the mscvrt functions that read the input characters before they are echoed. This simply copies the `getpass.win_getpass()` implementation without the stdin check, and byteifies around the edges. I'm not sure if there's a reasonable replacement for the check that we could implement. When echoing input into the hg command, the `ui.interactive()` check causes `ui.getpass()` to bail before getting here. If the proper config switches are used to bypass that and call this, the process stalls until '\n' is input into the console. So there could be a deadlock here when run by another command if the wrong config settings are applied. Differential Revision: https://phab.mercurial-scm.org/D10708
Mon, 10 May 2021 00:54:08 +0000 convert: update p4 for Python 3 stable
Nate Skulic <nate.skulic@gmail.com> [Mon, 10 May 2021 00:54:08 +0000] rev 47037
convert: update p4 for Python 3 Differential Revision: https://phab.mercurial-scm.org/D10703
Sun, 02 May 2021 16:56:20 -0400 tests: change the fixer commands to use the buffer attribute on stdio objects stable
Matt Harbison <matt_harbison@yahoo.com> [Sun, 02 May 2021 16:56:20 -0400] rev 47036
tests: change the fixer commands to use the buffer attribute on stdio objects Otherwise `\r` was getting injected into the fixed lines and throwing off the commit hashes on Windows when the fixer is invoked with py3. Differential Revision: https://phab.mercurial-scm.org/D10637
Sat, 01 May 2021 16:13:53 -0400 tests: stabilize test-persistent-nodemap.t on Windows stable
Matt Harbison <matt_harbison@yahoo.com> [Sat, 01 May 2021 16:13:53 -0400] rev 47035
tests: stabilize test-persistent-nodemap.t on Windows Several issues here: - Hooks can't invoke shell scripts on Windows, so use `sh` to launch - `dd` in MSYS only recognizes `status=noxfer` - The `PATH` updating triggered a massive slowdown, but is no longer needed I have no idea why, but removing the `PATH` update substantially increased the speed of the test. It was running finishing at ~4:30 with `--debug` and ~14:50 without it, but now completes in ~2:20 on my Windows laptop. Differential Revision: https://phab.mercurial-scm.org/D10636
Sun, 02 May 2021 19:54:08 -0400 tests: invoke some shell scripts through the shell interpreter for Windows stable
Matt Harbison <matt_harbison@yahoo.com> [Sun, 02 May 2021 19:54:08 -0400] rev 47034
tests: invoke some shell scripts through the shell interpreter for Windows Otherwise, Windows was prompting what program to use to open the file (or just opening it if there was a file association configured). Differential Revision: https://phab.mercurial-scm.org/D10635
Sat, 01 May 2021 13:04:56 -0400 tests: run python script through quoted interpreter instead of directly stable
Matt Harbison <matt_harbison@yahoo.com> [Sat, 01 May 2021 13:04:56 -0400] rev 47033
tests: run python script through quoted interpreter instead of directly This helps Windows when python is installed to %PROGRAMFILES%. Differential Revision: https://phab.mercurial-scm.org/D10634
Sat, 01 May 2021 00:41:43 -0400 tests: ensure `$PYTHON` is quoted for Windows stable
Matt Harbison <matt_harbison@yahoo.com> [Sat, 01 May 2021 00:41:43 -0400] rev 47032
tests: ensure `$PYTHON` is quoted for Windows Global installs of python3 go into "Program Files", and tons of tests fail with mysterious errors if this isn't quoted. Most of this is a followup to 0826d684a1b5, but a some of these were existing issues. Shebang lines are ignored because quoting breaks direct execution- these will need to be launched indirectly with the quoted `$PYTHON` command. Differential Revision: https://phab.mercurial-scm.org/D10633
Fri, 30 Apr 2021 16:13:02 -0700 black: make codebase compatible with black v21.4b2 and v20.8b1 stable
Kyle Lippincott <spectral@google.com> [Fri, 30 Apr 2021 16:13:02 -0700] rev 47031
black: make codebase compatible with black v21.4b2 and v20.8b1 I don't know what exact version of black made it care about these whitespace differences, but this is the version I got when I just installed it with `pip3 install black`. I'm intentionally not increasing the version of black required, as I don't want to force everyone to upgrade their version of black, and these fixes are backwards compatible with black v20.8b1. If there are more issues in the future and this becomes a maintenance burden I may do so in a future change. Tested with both versions of black (I got the older version via `pip3 install black==20.8b1`) Differential Revision: https://phab.mercurial-scm.org/D10539
Tue, 04 May 2021 13:28:42 -0400 debugcommands: fix some plural-agreements I noticed stable
Augie Fackler <augie@google.com> [Tue, 04 May 2021 13:28:42 -0400] rev 47030
debugcommands: fix some plural-agreements I noticed Differential Revision: https://phab.mercurial-scm.org/D10669
Mon, 03 May 2021 22:53:02 +0530 Added signature for changeset 067f2c53fb24 stable
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 03 May 2021 22:53:02 +0530] rev 47029
Added signature for changeset 067f2c53fb24
Mon, 03 May 2021 22:52:56 +0530 Added tag 5.8 for changeset 067f2c53fb24 stable
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 03 May 2021 22:52:56 +0530] rev 47028
Added tag 5.8 for changeset 067f2c53fb24
Sat, 01 May 2021 00:28:39 -0400 phabricator: adapt to the new `urlutil.url()` API stable 5.8
Matt Harbison <matt_harbison@yahoo.com> [Sat, 01 May 2021 00:28:39 -0400] rev 47027
phabricator: adapt to the new `urlutil.url()` API This avoids a bunch of deprecation warnings in the tests. Differential Revision: https://phab.mercurial-scm.org/D10541
Fri, 30 Apr 2021 17:36:09 -0400 extensions: ignore exceptions from an extension's `getversion()` method stable
Matt Harbison <matt_harbison@yahoo.com> [Fri, 30 Apr 2021 17:36:09 -0400] rev 47026
extensions: ignore exceptions from an extension's `getversion()` method This method is usually called when there's a stacktrace being generated, or with `hg version -v`. Raising another exception risks mangling the bug report info. I hit this issue when trying to add the method to the keyring extension to report the version of the extension and the underlying module, and ran into demandimport issues prior to py3.8. It seems like a wise thing to do anyway, though unfortunately there's no convenient `ui` object around to issue a warning. Use 'unknown' to signal that it tried to report a version and failed, unlike the default case of printing nothing. Differential Revision: https://phab.mercurial-scm.org/D10540
Wed, 28 Apr 2021 17:05:32 -0400 git: ensure all dirstate state values are bytes stable
Matt Harbison <matt_harbison@yahoo.com> [Wed, 28 Apr 2021 17:05:32 -0400] rev 47025
git: ensure all dirstate state values are bytes I'm not sure how this particular git status occurs, but after the fallout of issue 6510 and getting into the issue 6511 state where `git status` shows the files as modified in both the "to be committed" and "not staged" lists, `hg diff` was crashing in `workingctx.__contains__()`. Differential Revision: https://phab.mercurial-scm.org/D10532
Wed, 28 Apr 2021 10:29:45 -0400 tests: synchronize the git and Mercurial username stable
Matt Harbison <matt_harbison@yahoo.com> [Wed, 28 Apr 2021 10:29:45 -0400] rev 47024
tests: synchronize the git and Mercurial username The problem with the default name of "test" set by the test runner is the stringutil methods are unable to split out separate user and email addresses that git wants. This means the username is recorded in git as "test <test>". Amending a commit with that user ends up trying to use "<test>" as the person field for the new commit, and the git library complains about the angle brackets. We should probably abort with a clearer message any time this bad form is used with the git extension. One of the commit dates is tweaked to recreate the ambiguous hash prefix from before. Differential Revision: https://phab.mercurial-scm.org/D10531
Tue, 27 Apr 2021 19:38:19 -0400 git: initialize `extra` to have at least the branch name for nullid stable
Matt Harbison <matt_harbison@yahoo.com> [Tue, 27 Apr 2021 19:38:19 -0400] rev 47023
git: initialize `extra` to have at least the branch name for nullid Otherwise, this crashes trying to convert to local encoding: ... File "/mnt/c/Users/Matt/hg/mercurial/logcmdutil.py", line 333, in _show branch = ctx.branch() File "/mnt/c/Users/Matt/hg/mercurial/context.py", line 675, in branch return encoding.tolocal(self._changeset.extra.get(b"branch")) File "/mnt/c/Users/Matt/hg/mercurial/encoding.py", line 181, in tolocal if isasciistr(s): TypeError: a bytes-like object is required, not 'NoneType' This was originally reported to the thg bug tracker. https://foss.heptapod.net/mercurial/tortoisehg/thg/-/issues/5629 Differential Revision: https://phab.mercurial-scm.org/D10528
Tue, 27 Apr 2021 18:39:59 -0400 git: consistently use str for parents when rebuilding the index database stable
Matt Harbison <matt_harbison@yahoo.com> [Tue, 27 Apr 2021 18:39:59 -0400] rev 47022
git: consistently use str for parents when rebuilding the index database The tests show no changes, but when these values are overwritten shortly after when a git commit object is available, that uses str. It seems better to use that for consistency. It does materially affect the database though, because the old value stored was `X'3030..3030'` and is now '00..00' when the changelog table is dumped in sqlite3. There is one query that specifies the parents, but it passes the non null hashes as str, so it worked as expected. That likely explains the lack of test changes. Differential Revision: https://phab.mercurial-scm.org/D10527
Tue, 27 Apr 2021 17:54:08 -0400 git: pass the correct type to the sqlite3 query for baselog.hasnode() stable
Matt Harbison <matt_harbison@yahoo.com> [Tue, 27 Apr 2021 17:54:08 -0400] rev 47021
git: pass the correct type to the sqlite3 query for baselog.hasnode() It looks like this function is mostly used in exchange (which isn't supported now) and histedit (which crashes). But I did verify in a REPL that passing bytes to `db.execute()` fails to find the row, whereas passing str works. Differential Revision: https://phab.mercurial-scm.org/D10526
Tue, 27 Apr 2021 17:11:55 -0400 git: use the correct type for stopping changelog.revs() stable
Matt Harbison <matt_harbison@yahoo.com> [Tue, 27 Apr 2021 17:11:55 -0400] rev 47020
git: use the correct type for stopping changelog.revs() The `tip` function returns a binary node, but the database is expecting an int. Differential Revision: https://phab.mercurial-scm.org/D10525
Tue, 27 Apr 2021 16:58:59 -0400 git: use the proper filenode for deleted files in changelog.changelogrevision stable
Matt Harbison <matt_harbison@yahoo.com> [Tue, 27 Apr 2021 16:58:59 -0400] rev 47019
git: use the proper filenode for deleted files in changelog.changelogrevision Inline printing shows it still doesn't find the removed file in the test, but it is at least a str instead of bytes like the immediate query before it that does find files. Looking at the database, it doesn't look like the remove was recorded. Additionally, `hg log -r 'removes("re:.*")'` stacktraces. Differential Revision: https://phab.mercurial-scm.org/D10524
Tue, 27 Apr 2021 12:59:17 -0400 tests: add coverage for git.changelog.headrevs(...) stable
Matt Harbison <matt_harbison@yahoo.com> [Tue, 27 Apr 2021 12:59:17 -0400] rev 47018
tests: add coverage for git.changelog.headrevs(...) Differential Revision: https://phab.mercurial-scm.org/D10523
Tue, 27 Apr 2021 12:31:30 -0400 git: make changelog.tiprev() return int instead of tuple (issue6510) stable
Matt Harbison <matt_harbison@yahoo.com> [Tue, 27 Apr 2021 12:31:30 -0400] rev 47017
git: make changelog.tiprev() return int instead of tuple (issue6510) Differential Revision: https://phab.mercurial-scm.org/D10522
Tue, 27 Apr 2021 00:26:12 -0400 git: fix partial node matching stable
Matt Harbison <matt_harbison@yahoo.com> [Tue, 27 Apr 2021 00:26:12 -0400] rev 47016
git: fix partial node matching Looks like everything is meant to be a str here. Differential Revision: https://phab.mercurial-scm.org/D10521
Tue, 27 Apr 2021 00:23:05 -0400 tests: stabilize test-git-interop.t for some versions of git stable
Matt Harbison <matt_harbison@yahoo.com> [Tue, 27 Apr 2021 00:23:05 -0400] rev 47015
tests: stabilize test-git-interop.t for some versions of git Not sure why this differs on my system, but it's likely due to running 2.17.1 on Ubuntu 18.04. Differential Revision: https://phab.mercurial-scm.org/D10520
Fri, 30 Apr 2021 02:25:10 +0200 tests: bump default timeout to 360s stable
Joerg Sonnenberger <joerg@bec.de> [Fri, 30 Apr 2021 02:25:10 +0200] rev 47014
tests: bump default timeout to 360s A number of tests hit or almost hit the default limit even on modern hardware. While the tests are ideally split into smaller pieces, that's non-trivial work. HyperThreading and similar technologies can trigger this often, even without any other load on the machine. Differential Revision: https://phab.mercurial-scm.org/D10534
Tue, 20 Apr 2021 08:28:11 -0700 relnotes: copy contents of "next" to "5.8" and clear "next" stable
Martin von Zweigbergk <martinvonz@google.com> [Tue, 20 Apr 2021 08:28:11 -0700] rev 47013
relnotes: copy contents of "next" to "5.8" and clear "next" The same procedure as every year^Wcycle. Unlike previous cycles, I haven't actually recorded the copy because we don't want to propagate further changes in "next" (from the stable branch) to "5.8". Differential Revision: https://phab.mercurial-scm.org/D10500
Tue, 20 Apr 2021 13:01:47 -0700 dirstateguard: use mktemp-like functionality to generate the backup filenames stable
Kyle Lippincott <spectral@google.com> [Tue, 20 Apr 2021 13:01:47 -0700] rev 47012
dirstateguard: use mktemp-like functionality to generate the backup filenames Previously these were generated with names like: `dirstate.backup.commit.<memory address of dirstateguard>` This could cause problems if two hg commands ran at the same time that used the same memory address, (which is apparently not uncommon if chg is involved), as memory addresses are not unique across processes. This issue was reported in the post-review comments on http://phab.mercurial-scm.org/D9952. Differential Revision: https://phab.mercurial-scm.org/D10504
Sat, 24 Apr 2021 16:30:05 +0200 repoview: separate concerns in _filteredrepotypes comment stable
Georges Racinet <georges.racinet@octobus.net> [Sat, 24 Apr 2021 16:30:05 +0200] rev 47011
repoview: separate concerns in _filteredrepotypes comment The cited issue in Python bugtracker is closed, but hasn't been fixed. We've been able to use the attached example and reproduce it with Python 3.9. The point where it turns from needless stress on the GC to the an actual leak is when one factors in the fact that the GC was before Python 3.4 unable to collect some types (see PEP 442). Note that even with Python 2.7, the simple example of cycles due to __mro__ are collectable. This was seen again with the example attached on the CPython issue.
Fri, 23 Apr 2021 18:30:53 +0200 repoview: fix memory leak of filtered repo classes stable
Georges Racinet <georges.racinet@octobus.net> [Fri, 23 Apr 2021 18:30:53 +0200] rev 47010
repoview: fix memory leak of filtered repo classes The leak occurs in long-running server processes with extensions, and is measured at 110kB per request. Before this change, the contents of the `_filteredrepotypes` cache are not properly garbage collected, despite it begin a `WeakKeyDictionary`. Extensions have a tendency to generate a new repository class for each `localrepo` instantiation. Server processes based on `hgwebdir_mod` will instantiate a new `localrepo` for each HTTP request that involves a repository. As a result, with a testing process that repeatedly opens a repository with several extensions activated (`topic` notably among them), we see a steady increase in resident memory of 110kB per repository instantiation before this change. This is also true, if we call `gc.collect()` at each instantiation, like `hgwebdir_mod` does, or not. The cause of the leak is that the *values* aren't weak references. This change uses `weakref.ref` for the values, and this makes in our measurements the resident size increase drop to 5kB per repository instantiation, with no explicit call of `gc.collect()` at all. There is currently no reason to believe that this remaining leak of 5kB is related to or even due to Mercurial core. We've also seen evidence that `ui.ui` instances weren't properly garbage collected before the change (with the change, they are). This could explain why the figures are relatively high. In theory, the collection of weak references could lead to much more misses in the cache, so we measured the impact on the original case that was motivation for introducing that cache in 7e89bd0cfb86 (see also issue5043): `hg convert` of the mozilla-central repository. The bad news here is that there is a major memory leak there, both with and without the present changeset. There were no more cache misses, and we could see no more memory leak with this change: the resident size after importing roughly 100000 changesets was at 12.4GB before, and 12.5GB after. The small increase is mentioned for completeness only, and we believe that it should be ignored, at least as long as the main leak isn't fixed. At less than 1% of the main leak, even finding out whether it is merely noise would be wasteful. Original context where this was spotted and first mitigated: https://foss.heptapod.net/heptapod/heptapod/-/issues/466 The leak reduction was also obtained in Heptapod inner HTTP server, which amounts to the same as `hgwebdir_mod` for these questions. The measurements done with Python 3.9, similar figures seen with 3.8. More work on our side would be needed to give measurements with 2.7, because of testing server process does not support it.
Sat, 24 Apr 2021 15:46:39 +0200 repoview: style change in newtype() cache handling stable
Georges Racinet <georges.racinet@octobus.net> [Sat, 24 Apr 2021 15:46:39 +0200] rev 47009
repoview: style change in newtype() cache handling This way of writing it does not change the logic at all, but is more fit for the change we want to make in the next changeset. If anything, that's one dict lookup less in the hot path, but that should be non measurable.
Thu, 22 Apr 2021 02:57:30 +0200 tests: don't hard-code /bin/bash stable
Joerg Sonnenberger <joerg@bec.de> [Thu, 22 Apr 2021 02:57:30 +0200] rev 47008
tests: don't hard-code /bin/bash From Thomas Klausner in pkgsrc. Differential Revision: https://phab.mercurial-scm.org/D10507
Wed, 21 Apr 2021 17:59:14 +0200 lint: fix failing code check stable
Raphaël Gomès <rgomes@octobus.net> [Wed, 21 Apr 2021 17:59:14 +0200] rev 47007
lint: fix failing code check 8d2b62d716b0 introduced code that `test-check-code.t` wasn't happy about, this fixes it. Differential Revision: https://phab.mercurial-scm.org/D10506
Wed, 14 Apr 2021 09:49:36 -0400 typing: enable pytype processing on mercurial/upgrade_utils/actions.py stable
Matt Harbison <matt_harbison@yahoo.com> [Wed, 14 Apr 2021 09:49:36 -0400] rev 47006
typing: enable pytype processing on mercurial/upgrade_utils/actions.py This was the suggested workaround for the pytype bug that caused this file to be processed forever. Differential Revision: https://phab.mercurial-scm.org/D10460
Sun, 18 Apr 2021 00:56:09 -0400 incoming: use bytes for an error message stable
Matt Harbison <matt_harbison@yahoo.com> [Sun, 18 Apr 2021 00:56:09 -0400] rev 47005
incoming: use bytes for an error message Caught by pytype. Differential Revision: https://phab.mercurial-scm.org/D10461
Wed, 21 Apr 2021 10:58:42 -0400 merge: stable heads stable
Augie Fackler <augie@google.com> [Wed, 21 Apr 2021 10:58:42 -0400] rev 47004
merge: stable heads I forgot to pull before rolling rc1, so we just have a couple of patches that missed the rc1 train. Mea culpa.
Wed, 21 Apr 2021 10:49:29 -0400 Added signature for changeset 8d2b62d716b0 stable
Augie Fackler <raf@durin42.com> [Wed, 21 Apr 2021 10:49:29 -0400] rev 47003
Added signature for changeset 8d2b62d716b0
Wed, 21 Apr 2021 10:49:28 -0400 Added tag 5.8rc1 for changeset 8d2b62d716b0 stable
Augie Fackler <raf@durin42.com> [Wed, 21 Apr 2021 10:49:28 -0400] rev 47002
Added tag 5.8rc1 for changeset 8d2b62d716b0
Tue, 20 Apr 2021 16:31:13 +0200 relnote: mention a nodemap bug fixes stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 20 Apr 2021 16:31:13 +0200] rev 47001
relnote: mention a nodemap bug fixes The fix was in a3720569a43f. Differential Revision: https://phab.mercurial-scm.org/D10499
Tue, 20 Apr 2021 16:29:05 +0200 relnote: document the use of persistent-nodemap by default for Rust build stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 20 Apr 2021 16:29:05 +0200] rev 47000
relnote: document the use of persistent-nodemap by default for Rust build Differential Revision: https://phab.mercurial-scm.org/D10498
Tue, 20 Apr 2021 16:18:43 +0200 relnode: document the move to `zstd` as default compression stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 20 Apr 2021 16:18:43 +0200] rev 46999
relnode: document the move to `zstd` as default compression Differential Revision: https://phab.mercurial-scm.org/D10497
Tue, 20 Apr 2021 16:12:19 +0200 relnote: clarify the backward compatibility entry about p1/p2 swap stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 20 Apr 2021 16:12:19 +0200] rev 46998
relnote: clarify the backward compatibility entry about p1/p2 swap The previous message might read a bit scary. So we clarify that the nodeid are not affected. Differential Revision: https://phab.mercurial-scm.org/D10496
Tue, 20 Apr 2021 23:31:36 -0400 mail: add a TODO about proper mbox locking stable
Matt Harbison <matt_harbison@yahoo.com> [Tue, 20 Apr 2021 23:31:36 -0400] rev 46997
mail: add a TODO about proper mbox locking Per @nbjoerg in IRC, the mbox isn't locked correctly. Differential Revision: https://phab.mercurial-scm.org/D10505
Tue, 20 Apr 2021 20:35:46 +0200 packaging: extract pre-computed version when running from plain tarball stable 5.8rc1
Joerg Sonnenberger <joerg@bec.de> [Tue, 20 Apr 2021 20:35:46 +0200] rev 46996
packaging: extract pre-computed version when running from plain tarball The tarballs created by setup.py are not including the usual archive markers that `hg archive` leaves, so the rewrite of the version number computation actually left the empty version string around. This meant that installations from PyPI would use 0.0.0 as version string. Differential Revision: https://phab.mercurial-scm.org/D10502
Tue, 20 Apr 2021 11:12:20 -0400 Added signature for changeset f67b8946bb1b stable
Augie Fackler <raf@durin42.com> [Tue, 20 Apr 2021 11:12:20 -0400] rev 46995
Added signature for changeset f67b8946bb1b
Tue, 20 Apr 2021 11:12:19 -0400 Added tag 5.8rc0 for changeset f67b8946bb1b stable
Augie Fackler <raf@durin42.com> [Tue, 20 Apr 2021 11:12:19 -0400] rev 46994
Added tag 5.8rc0 for changeset f67b8946bb1b
Tue, 20 Apr 2021 11:01:06 -0400 merge: default into stable for 5.8 rc stable 5.8rc0
Augie Fackler <augie@google.com> [Tue, 20 Apr 2021 11:01:06 -0400] rev 46993
merge: default into stable for 5.8 rc
Mon, 19 Apr 2021 20:38:52 -0400 mail: force SMTPException to bytes before wrapping in error.Abort
Matt Harbison <matt_harbison@yahoo.com> [Mon, 19 Apr 2021 20:38:52 -0400] rev 46992
mail: force SMTPException to bytes before wrapping in error.Abort Pytype wasn't complaining about this for some reason, but PyCharm was and we already handle another instance of this exception the same way in this function. Differential Revision: https://phab.mercurial-scm.org/D10473
Mon, 19 Apr 2021 17:26:57 -0400 mail: split out the SMTP login to allow the keyring extension to wrap it
Matt Harbison <matt_harbison@yahoo.com> [Mon, 19 Apr 2021 17:26:57 -0400] rev 46991
mail: split out the SMTP login to allow the keyring extension to wrap it The keyring extension only needs to tweak this tiny section of the larger function. But without any place to intercept the username/password fetching, it copy/pasted the entire function, and has grown a bunch of compatibility hacks to support older versions of Mercurial as well. Differential Revision: https://phab.mercurial-scm.org/D10471
Tue, 20 Apr 2021 04:27:03 +0200 store: exclude `undo.` nodemap's file from `walk`
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 20 Apr 2021 04:27:03 +0200] rev 46990
store: exclude `undo.` nodemap's file from `walk` There are "temporary" local file that we should not be transfered by `walk` user like local clone and stream clone. This fix the small issue that the new tests highlighted. Differential Revision: https://phab.mercurial-scm.org/D10482
Tue, 20 Apr 2021 05:08:55 +0200 streamclone: treat volatile file as "fullfile"
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 20 Apr 2021 05:08:55 +0200] rev 46989
streamclone: treat volatile file as "fullfile" The nodemap related file might change (or get deleted) during the stream clone in a way incompatible with the streaming process. So we introduce a new flag for this type of file and integrate it with the existing `revlog_type` field recently added to `store.walk` returns. We use that new flat to dispatch such file to the existing mechanism for "atomic replacement" file for the nodemap docket and datafile. This fix the bugs we have been adding tests for. Strictly speaking, the nodemap datafile is happened only a could maybe be used in a slightly more efficient way, however this is good enough for now. Differential Revision: https://phab.mercurial-scm.org/D10481
Mon, 19 Apr 2021 20:47:46 +0200 nodemap: add a test about nodemap "vacuum" during stream clone
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 19 Apr 2021 20:47:46 +0200] rev 46988
nodemap: add a test about nodemap "vacuum" during stream clone When the nodemap "vacuum" it generate a new datafile, with a new unique name and delete the old one. This confuse the stream clone code and create the same kind of crash we were seeing in the previous patch. We build a test case where this happens. The next changeset will contains a fix We can also notice that we are, wrongfully exchanging `undo.*` files that the client will not be able to use. This will be dealt with soon. Differential Revision: https://phab.mercurial-scm.org/D10480
Mon, 19 Apr 2021 20:24:13 +0200 nodemap: add a test about racy commit during stream clone
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 19 Apr 2021 20:24:13 +0200] rev 46987
nodemap: add a test about racy commit during stream clone That test show that the resulting client nodemap is different from the server one. This happens because the server one transferred a corrupted node map. The data file match the pre-commit content while the docket has post commit content. As the result the nodemap was detected invalid and recomputed. When running without the rust implementation, the code is also generating a new datafile unconditionally, This mean the older file is no longer there are transfer time, resulting in a crash. We will fix this issue later, but we start with writing tests highlighting the issue. Differential Revision: https://phab.mercurial-scm.org/D10479
Mon, 19 Apr 2021 19:12:28 +0200 streamclone: remove sleep based "synchronisation" in tests
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 19 Apr 2021 19:12:28 +0200] rev 46986
streamclone: remove sleep based "synchronisation" in tests Sleep based test synchronisation does not work. Variation in machine performance and load can make the two process miss their windows. Instead we migrate to explicit signaling through the file system as other tests file are using. Differential Revision: https://phab.mercurial-scm.org/D10478
Mon, 19 Apr 2021 19:10:49 +0200 testing: add a `write_file` function
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 19 Apr 2021 19:10:49 +0200] rev 46985
testing: add a `write_file` function The function is kinda trivial, but having a simple function avoid silly mistake. Differential Revision: https://phab.mercurial-scm.org/D10477
Mon, 19 Apr 2021 19:10:18 +0200 testing: add a utility function to wait for file create
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 19 Apr 2021 19:10:18 +0200] rev 46984
testing: add a utility function to wait for file create This is similar to `tests/testlib/wait-on-file`, but for the python code Differential Revision: https://phab.mercurial-scm.org/D10476
Mon, 19 Apr 2021 19:09:18 +0200 streamclone: check the errors log in tests
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 19 Apr 2021 19:09:18 +0200] rev 46983
streamclone: check the errors log in tests Code can be buggy, in that case having error message tend to help. Differential Revision: https://phab.mercurial-scm.org/D10475
Tue, 20 Apr 2021 00:23:56 -0400 mail: use a context manager when writing to mbox
Matt Harbison <matt_harbison@yahoo.com> [Tue, 20 Apr 2021 00:23:56 -0400] rev 46982
mail: use a context manager when writing to mbox Differential Revision: https://phab.mercurial-scm.org/D10484
Mon, 19 Apr 2021 21:31:24 -0700 errors: remove unnecessary varargs handling from OutOfBandError
Martin von Zweigbergk <martinvonz@google.com> [Mon, 19 Apr 2021 21:31:24 -0700] rev 46981
errors: remove unnecessary varargs handling from OutOfBandError In my recent D10465, I moved some code over from scmutil into `OutOfBandError.__init__`. The code was written to deal with an arbitrary number of `message` arguments to the constructor. It turns out that we only ever pass 0 or 1. Given that, let's simplify it. Differential Revision: https://phab.mercurial-scm.org/D10483
Mon, 19 Apr 2021 11:10:16 +0200 phab-refresh: use a special comment on the stable branch
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 19 Apr 2021 11:10:16 +0200] rev 46980
phab-refresh: use a special comment on the stable branch Phabricator make it hard to spot the branch information. As a result patch intended for stable are consistently queued for default. We add a special command and flashy GIF to try to attract reviewer attention on the fact patch are intended for stable. Differential Revision: https://phab.mercurial-scm.org/D10464
Mon, 19 Apr 2021 11:04:11 +0200 phab-refresh: extract the comment in a variable
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 19 Apr 2021 11:04:11 +0200] rev 46979
phab-refresh: extract the comment in a variable This make the script more readable and it is about to become more complex. Differential Revision: https://phab.mercurial-scm.org/D10463
Mon, 19 Apr 2021 16:53:45 -0700 tests: make test-archive.t pass on py3.9 (issue6504)
Martin von Zweigbergk <martinvonz@google.com> [Mon, 19 Apr 2021 16:53:45 -0700] rev 46978
tests: make test-archive.t pass on py3.9 (issue6504) Something got stricter at parsing URL query parameters and now the parameters need to be separated by "&"; ";" is no longer allowed. See issue6504 for details. Differential Revision: https://phab.mercurial-scm.org/D10472
Mon, 19 Apr 2021 12:52:23 -0700 errors: raise RemoteError in some places in exchange.py
Martin von Zweigbergk <martinvonz@google.com> [Mon, 19 Apr 2021 12:52:23 -0700] rev 46977
errors: raise RemoteError in some places in exchange.py This is part of https://www.mercurial-scm.org/wiki/ErrorCategoriesPlan Differential Revision: https://phab.mercurial-scm.org/D10467
Mon, 19 Apr 2021 09:37:01 -0700 errors: introduce a class for remote errors
Martin von Zweigbergk <martinvonz@google.com> [Mon, 19 Apr 2021 09:37:01 -0700] rev 46976
errors: introduce a class for remote errors Having an exception for remote errors makes it much easier to exit with the right detailed exit code. Differential Revision: https://phab.mercurial-scm.org/D10466
Mon, 19 Apr 2021 10:49:15 -0700 errors: make OutOfBandError extend Abort
Martin von Zweigbergk <martinvonz@google.com> [Mon, 19 Apr 2021 10:49:15 -0700] rev 46975
errors: make OutOfBandError extend Abort I'm about to create a new `RemoteError` exception and make `OutOfBandError` extend it. This patch prepares for that. Differential Revision: https://phab.mercurial-scm.org/D10465
Mon, 05 Apr 2021 12:22:25 +0200 revlog: replace revlog._io.size with a new revlog.index.entry_size
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 05 Apr 2021 12:22:25 +0200] rev 46974
revlog: replace revlog._io.size with a new revlog.index.entry_size The `revlogio` class is mostly a relic from the past. Once in charge of the full revlog related Input/Output code, that class gradually lost responsibilities to the point where more IO are now done by `revlog.index` objects or revlog objects themself. I would like to ultimately remove the `revlogio` class, to do so I start simple with move the "entry size" information on the index. (The index is already responsible of the binary unpacking, so it knows the size. Differential Revision: https://phab.mercurial-scm.org/D10309
Wed, 14 Apr 2021 20:32:53 +0200 perf-discovery: use `get_unique_pull_path`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 20:32:53 +0200] rev 46973
perf-discovery: use `get_unique_pull_path` This performance command now use the new API, unless the benchmarked Mercurial is older. Differential Revision: https://phab.mercurial-scm.org/D10423
Wed, 14 Apr 2021 00:38:25 +0800 help: clarify when `$HG_URL` and `$HG_SOURCE` are added in hooks
Aay Jay Chan <aayjaychan@itopia.com.hk> [Wed, 14 Apr 2021 00:38:25 +0800] rev 46972
help: clarify when `$HG_URL` and `$HG_SOURCE` are added in hooks Differential Revision: https://phab.mercurial-scm.org/D10400
Fri, 16 Apr 2021 15:39:00 +0200 nodemap: deal with data mmap error
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 16 Apr 2021 15:39:00 +0200] rev 46971
nodemap: deal with data mmap error If the file is too small, the mmapread call would raise a ValueError. We catch that and ignore nodemap content (as we do without mmap). This make the repository slightly slower (until the next write) but usable. Unlike the current crash. Differential Revision: https://phab.mercurial-scm.org/D10458
Fri, 16 Apr 2021 14:59:13 +0200 nodemap: test various corruption scenario for the persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 16 Apr 2021 14:59:13 +0200] rev 46970
nodemap: test various corruption scenario for the persistent nodemap Corruption can happens in the wild, either because some of our code is buggy or because repository were shared/transfered in a strange manners. Currently one of the corruption case (not enough data) lead to a crash. We add explicit tests for theses cases. Differential Revision: https://phab.mercurial-scm.org/D10457
Sat, 17 Apr 2021 00:28:21 -0400 cmdutil: fix an uninitialize variable usage in clearunfinished()
Matt Harbison <matt_harbison@yahoo.com> [Sat, 17 Apr 2021 00:28:21 -0400] rev 46969
cmdutil: fix an uninitialize variable usage in clearunfinished() I happened to notice that PyCharm flagged this while looking for something else. I'm pretty sure it meant to check the current state in the iteration, and not keep reusing the last one in the previous iteration. Differential Revision: https://phab.mercurial-scm.org/D10459
Mon, 05 Apr 2021 14:19:17 +0800 help: document `$HG_NEW_OBSMARKERS` in pretxnclose hook
Aay Jay Chan <aayjaychan@itopia.com.hk> [Mon, 05 Apr 2021 14:19:17 +0800] rev 46968
help: document `$HG_NEW_OBSMARKERS` in pretxnclose hook Differential Revision: https://phab.mercurial-scm.org/D10399
Thu, 01 Apr 2021 22:43:55 +0800 help: prepend environment variables used in hooks with "$"
Aay Jay Chan <aayjaychan@itopia.com.hk> [Thu, 01 Apr 2021 22:43:55 +0800] rev 46967
help: prepend environment variables used in hooks with "$" Most of them have "$" prefix but some don't, so adding it for consistency. Differential Revision: https://phab.mercurial-scm.org/D10398
Thu, 15 Apr 2021 09:59:12 +0200 revset: drop an outdated comment
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 15 Apr 2021 09:59:12 +0200] rev 46966
revset: drop an outdated comment There is not `ui.expandpath` call there anymore. Differential Revision: https://phab.mercurial-scm.org/D10435
Thu, 15 Apr 2021 01:03:12 +0200 ui: deprecated `ui.expandpath`
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 15 Apr 2021 01:03:12 +0200] rev 46965
ui: deprecated `ui.expandpath` This function return a single path, something incompatible with the coming change to `[paths]` definition to allow multiple associated urls. Now that all user got migrated, we deprecate the function. Differential Revision: https://phab.mercurial-scm.org/D10432
Wed, 14 Apr 2021 21:29:27 +0200 urlutil: remove usage of `ui.expandpath` in `get_clone_path`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 21:29:27 +0200] rev 46964
urlutil: remove usage of `ui.expandpath` in `get_clone_path` We want to deprecate `ui.expandpath` and simplify the code before adding more complexity in the form of `[paths]` entry pointing to multiple url. So we inline the relevant bits. Differential Revision: https://phab.mercurial-scm.org/D10431
Wed, 14 Apr 2021 21:27:00 +0200 urlutil: remove usage of `ui.expandpath` in `get_unique_pull_path`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 21:27:00 +0200] rev 46963
urlutil: remove usage of `ui.expandpath` in `get_unique_pull_path` We want to deprecate `ui.expandpath` and simplify the code before adding more complexity in the form of `[paths]` entry pointing to multiple url. So we inline the relevant bits. Differential Revision: https://phab.mercurial-scm.org/D10430
Wed, 14 Apr 2021 21:20:58 +0200 urlutil: remove usage of `ui.expandpath` in `get_pull_paths`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 21:20:58 +0200] rev 46962
urlutil: remove usage of `ui.expandpath` in `get_pull_paths` We want to deprecate `ui.expandpath` and simplify the code before adding more complexity in the form of `[paths]` entry pointing to multiple url. So we inline the relevant bits. Differential Revision: https://phab.mercurial-scm.org/D10429
Wed, 14 Apr 2021 21:15:53 +0200 debugbackupbundle: use `get_unique_pull_path`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 21:15:53 +0200] rev 46961
debugbackupbundle: use `get_unique_pull_path` This is the last known user of `ui.expandpath` outside of `urlutil`. Hooray. Differential Revision: https://phab.mercurial-scm.org/D10428
Wed, 14 Apr 2021 21:15:22 +0200 debugssl: use `get_unique_pull_path`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 21:15:22 +0200] rev 46960
debugssl: use `get_unique_pull_path` Let's move this code to the new API. Differential Revision: https://phab.mercurial-scm.org/D10427
Wed, 14 Apr 2021 21:11:39 +0200 debugdiscovery: use `get_unique_pull_path`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 21:11:39 +0200] rev 46959
debugdiscovery: use `get_unique_pull_path` Lets move this code to the new API. Differential Revision: https://phab.mercurial-scm.org/D10426
Wed, 14 Apr 2021 21:02:38 +0200 profiling: use `util.expandpath` instead of `ui.expandpath` for output
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 21:02:38 +0200] rev 46958
profiling: use `util.expandpath` instead of `ui.expandpath` for output Given we are talking about the path to an output file, I am fairly certain that the initial author meant to expand `~` and the like and not to resolve entry from `[paths]`. Differential Revision: https://phab.mercurial-scm.org/D10425
Wed, 14 Apr 2021 20:57:34 +0200 dispatch: use the new API to resolve --repository
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 20:57:34 +0200] rev 46957
dispatch: use the new API to resolve --repository An even weirder feature of Mercurial is the ability to use `[paths]` alias as value of `--repository`. The weird feature now use the new APIs. Differential Revision: https://phab.mercurial-scm.org/D10424
Wed, 14 Apr 2021 20:21:11 +0200 revset: use `get_unique_pull_path` for `remote(…)`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 20:21:11 +0200] rev 46956
revset: use `get_unique_pull_path` for `remote(…)` This one is also resolving path. For now we restrict the feature to a single destination. This might change in the future. Differential Revision: https://phab.mercurial-scm.org/D10422
Wed, 14 Apr 2021 20:15:09 +0200 remotefilelog: use `get_unique_pull_path` in `getflogheads`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 20:15:09 +0200] rev 46955
remotefilelog: use `get_unique_pull_path` in `getflogheads` Another command moved to the new API, hooray. Differential Revision: https://phab.mercurial-scm.org/D10421
Wed, 14 Apr 2021 19:30:48 +0200 summary: use the new APIs
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 19:30:48 +0200] rev 46954
summary: use the new APIs Summary can perform some incoming/outgoing queries (that should be common to the other command with the same needs, but that is another story). We now use the new APIs to do so. The current code behavior is a bit fishy, relying to the fact "default" will be picked as the destination in last resort. I did not altered that, but left various comment to highlight the issue. Differential Revision: https://phab.mercurial-scm.org/D10420
Wed, 14 Apr 2021 18:37:29 +0200 share: use `get_clone_path`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 18:37:29 +0200] rev 46953
share: use `get_clone_path` Since `hg share` is mostly like clone, do the same changes there. Differential Revision: https://phab.mercurial-scm.org/D10419
Wed, 14 Apr 2021 18:02:25 +0200 init: use `get_clone_path` when suitable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 18:02:25 +0200] rev 46952
init: use `get_clone_path` when suitable `hg init` has this weird feature were you can refer to `[paths]` entry select the path to initialize. We move that code to the new APIs. Differential Revision: https://phab.mercurial-scm.org/D10418
Wed, 14 Apr 2021 18:34:42 +0200 clone: use `get_clone_path`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 18:34:42 +0200] rev 46951
clone: use `get_clone_path` "Surprisingly", the new API is well suited for `hg clone` too. Differential Revision: https://phab.mercurial-scm.org/D10417
(0) -30000 -10000 -3000 -1000 -300 -100 -96 +96 +100 +300 +1000 +3000 tip