Matt Harbison <matt_harbison@yahoo.com> [Mon, 13 Dec 2021 00:25:38 -0500] rev 48478
pytype: stop excluding cmdutil.py
Whatever was broken here seems to have been previously fixed.
Differential Revision: https://phab.mercurial-scm.org/D11917
Matt Harbison <matt_harbison@yahoo.com> [Mon, 13 Dec 2021 00:04:53 -0500] rev 48477
pytype: stop excluding copies.py
I can't prove that `targetrev` is always in `all_copies`, but it would have been
a runtime error before too if it's not.
Differential Revision: https://phab.mercurial-scm.org/D11916
Matt Harbison <matt_harbison@yahoo.com> [Sun, 12 Dec 2021 22:29:46 -0500] rev 48476
copies: fix some documentation typos
Differential Revision: https://phab.mercurial-scm.org/D11915
Matt Harbison <matt_harbison@yahoo.com> [Sun, 12 Dec 2021 22:24:16 -0500] rev 48475
copies: drop an unused variable
Differential Revision: https://phab.mercurial-scm.org/D11914
Matt Harbison <matt_harbison@yahoo.com> [Sun, 12 Dec 2021 22:09:13 -0500] rev 48474
pytype: stop excluding lsprof.py
Whatever was previously flagged in this file appears to have been fixed.
Differential Revision: https://phab.mercurial-scm.org/D11913
Matt Harbison <matt_harbison@yahoo.com> [Sun, 12 Dec 2021 21:10:02 -0500] rev 48473
pytype: stop excluding changegroup.py
The false positives that were detected seem to be related to what happens to the
variables after the local methods are used:
File "/mnt/c/Users/Matt/hg/mercurial/changegroup.py", line 353, in ondupchangelog:
No attribute 'append' on range [attribute-error]
In Union[List[nothing], range]
File "/mnt/c/Users/Matt/hg/mercurial/changegroup.py", line 357, in onchangelog:
No attribute 'update' on None [attribute-error]
Differential Revision: https://phab.mercurial-scm.org/D11912
Matt Harbison <matt_harbison@yahoo.com> [Sun, 12 Dec 2021 20:01:05 -0500] rev 48472
pytype: stop excluding upgrade.py
The sole failure here was this, which is fixed by simply creating a set like the
caller, instead of a dict:
File "/mnt/c/Users/Matt/hg/mercurial/upgrade.py", line 73, in upgraderepo:
No attribute 'discard' on Dict[nothing, nothing] [attribute-error]
In Union[Any, Dict[nothing, nothing]]
Differential Revision: https://phab.mercurial-scm.org/D11911
Simon Sapin <simon.sapin@octobus.net> [Tue, 14 Dec 2021 20:36:36 +0100] rev 48471
rhg: Skip reading the contents of ambiguous files in some cases
If the size of the file in the working directory does not match the length of
the filelog data, we know its contents will be different and don’t need to
read it.
rhg still decodes the filelog revision, which is not needed in some cases.
Differential Revision: https://phab.mercurial-scm.org/D11910
Simon Sapin <simon.sapin@octobus.net> [Tue, 14 Dec 2021 19:47:33 +0100] rev 48470
rhg: Mark it as expected that the
issue6528 bug is not reproduced
Differential Revision: https://phab.mercurial-scm.org/D11909
Martin von Zweigbergk <martinvonz@google.com> [Tue, 14 Dec 2021 13:41:34 -0800] rev 48469
filemerge: remove leftover documentation of removed argument
I removed the `premerge` argument in
https://phab.mercurial-scm.org/D11859.
Differential Revision: https://phab.mercurial-scm.org/D11925
Matt Harbison <matt_harbison@yahoo.com> [Mon, 13 Dec 2021 14:44:16 -0500] rev 48468
merge with stable
Simon Sapin <simon.sapin@octobus.net> [Mon, 13 Dec 2021 14:37:16 +0100] rev 48467
rhg: Print "bad match" errors in rhg status
Previously these would only be visible if enabled with some RUST_LOG
environment variable.
Differential Revision: https://phab.mercurial-scm.org/D11908
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 07 Dec 2021 15:14:08 +0100] rev 48466
share: make it possible to control the working copy format variant
A share will use the same format as its source for the store, but there are no
reason to not lets it control the working copy variant at creation time.
So we make it so.
Differential Revision: https://phab.mercurial-scm.org/D11892
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 07 Dec 2021 14:51:45 +0100] rev 48465
share: move the requirement initialisation code around
We will make this logic more flexible in the next patch. We start by moving it
at the end of the function without any other change for clarity.
Differential Revision: https://phab.mercurial-scm.org/D11891
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 08 Dec 2021 05:35:32 +0100] rev 48464
test: use `hg debugrequires` instead of `cat` in some tests
This give the "same" result, while taking in account that the requirement file
might be in different location, like what `share-safe` is doing.
Differential Revision: https://phab.mercurial-scm.org/D11895
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 08 Dec 2021 05:42:01 +0100] rev 48463
test: simplify `debugformat` matching in test-phases.t
This will make the test less sensible to unrelated format changing.
Differential Revision: https://phab.mercurial-scm.org/D11894
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 07 Dec 2021 23:49:35 +0100] rev 48462
test: simplify `debugformat` matching in test-copies-chain-merge
This will make the test less sensible to unrelated format changing.
Differential Revision: https://phab.mercurial-scm.org/D11893
Kyle Lippincott <spectral@google.com> [Tue, 07 Dec 2021 15:53:55 -0800] rev 48461
status: when extracting arguments from `opts`, use the same default values
Sometimes other code, such as commit when using `commands.commit.post-status`,
calls `commands.status()` without going through the normal dispatch mechanism
that would typically fill in the args to be something besides None. As a
"defense in depth" mechanism for a bug where Mercurial would crash if both
`commands.commit.post-status` and `experimental.directaccess` were enabled,
let's sanitize these values to be identical to the values they would have when
the user invoked this method from the commandline.
Differential Revision: https://phab.mercurial-scm.org/D11884
Kyle Lippincott <spectral@google.com> [Tue, 07 Dec 2021 15:48:22 -0800] rev 48460
directaccess: fix uses of commands.status() that don't go through flag parsing
When `commands.commit.post-status` is enabled, after commit/amend,
commands.status() is called without any revs argument, which means that status
gets None instead of an empty list like it would receive if the user had invoked
this on the commandline. With the `experimental.directaccess` config enabled,
this gets passed to `unhidehashlikerevs`, which didn't previously handle None,
but now should.
Differential Revision: https://phab.mercurial-scm.org/D11883
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com> [Sun, 07 Nov 2021 16:25:42 -0500] rev 48459
test: add test for a former race resulting in bad dirstate
In 6.0 this used to result in the size being stored in the dirstate is wrong.
This was fixed by other change to the mtime gathering logic.
Differential Revision: https://phab.mercurial-scm.org/D11749
Arseniy Alekseyev <aalekseyev@janestreet.com> [Tue, 07 Dec 2021 18:57:43 +0000] rev 48458
rhg: fix a crash on non-generaldelta revlogs
Differential Revision: https://phab.mercurial-scm.org/D11882
Arseniy Alekseyev <aalekseyev@janestreet.com> [Tue, 07 Dec 2021 18:12:13 +0000] rev 48457
rhg: centralize index header parsing
Centralize index header parsing, parse the generaldelta flag,
and leave breadcrumbs to relate the code to python.
Differential Revision: https://phab.mercurial-scm.org/D11881
Arseniy Alekseyev <aalekseyev@janestreet.com> [Tue, 07 Dec 2021 17:50:19 +0000] rev 48456
rhg: demonstrate that rhg breaks on non-generaldelta revlogs
Differential Revision: https://phab.mercurial-scm.org/D11880
Simon Sapin <simon.sapin@octobus.net> [Fri, 10 Dec 2021 23:08:25 +0100] rev 48455
tests: add a short `sleep` in test-status.t
With dirstate-v2 and rhg both enabled, this test would sometimes fail for me
with:
```
--- tests/test-status.t
+++ tests/test-status.t#dirstate-v2.err
@@ -943,7 +943,7 @@
$ rm subdir/unknown
$ hg status
$ hg debugdirstate --all --no-dates | grep '^ '
- 0 -1 set subdir
+ 0 -1 unset subdir
```
Meaning that `status` did not write a directory mtime in the dirstate
as expected. This can happen if the observed mtime of the directory is
the same as "current time" at the start of `status`. This current time
is obtained by creating a temporary file and checking its mtime.
Even with ext4 on my system being able to store nanosecond precision,
identical mtime for successive but separate operations is still possible
becuse the kernel may cache the current time:
https://stackoverflow.com/a/
14393315/1162888
0.1 second should be enough for this cache to be updated, without
significantly slowing down the test.
Differential Revision: https://phab.mercurial-scm.org/D11900