Wed, 15 Dec 2021 14:50:07 +0100 changelog-v2: fix an assertion error to display the right data
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 15 Dec 2021 14:50:07 +0100] rev 48498
changelog-v2: fix an assertion error to display the right data We were checking on thing and displaying the other. Differential Revision: https://phab.mercurial-scm.org/D11935
Tue, 14 Dec 2021 19:24:24 +0100 changelog-v2: use helper constant in the code to pack/unpack entries
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 14 Dec 2021 19:24:24 +0100] rev 48497
changelog-v2: use helper constant in the code to pack/unpack entries This makes the code simpler to read and modify. This is probably less efficient, but we are talking about the Python implementation here, so performance is concerne secondary to readability. Differential Revision: https://phab.mercurial-scm.org/D11934
Wed, 15 Dec 2021 15:28:30 +0100 revlog: add some information about the revision we cannot find
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 15 Dec 2021 15:28:30 +0100] rev 48496
revlog: add some information about the revision we cannot find Parameter to Exception are good, use them. Differential Revision: https://phab.mercurial-scm.org/D11933
Thu, 16 Dec 2021 17:34:51 +0100 rhg: Use binary search in manifest lookup
Simon Sapin <simon.sapin@octobus.net> [Thu, 16 Dec 2021 17:34:51 +0100] rev 48495
rhg: Use binary search in manifest lookup … instead of linear scan, when looking for a single entry based on its path. Manifest entries are sorted by path, but are variable-size so we can’t use the standard library’s `[T]::binary_search`. We can still jump to a byte index and then look around for entry boundaries. Differential Revision: https://phab.mercurial-scm.org/D11932
Mon, 29 Nov 2021 12:27:33 +0000 sparse: lock the store when updating requirements config stable
Arseniy Alekseyev <aalekseyev@janestreet.com> [Mon, 29 Nov 2021 12:27:33 +0000] rev 48494
sparse: lock the store when updating requirements config Differential Revision: https://phab.mercurial-scm.org/D11817
Tue, 16 Nov 2021 17:35:57 +0000 sparse: demonstrate a bug when used with safe-share stable
Arseniy Alekseyev <aalekseyev@janestreet.com> [Tue, 16 Nov 2021 17:35:57 +0000] rev 48493
sparse: demonstrate a bug when used with safe-share sparse: lock the store when updating requirements config Differential Revision: https://phab.mercurial-scm.org/D11766
Fri, 17 Dec 2021 11:46:30 +0100 rust: Upgrade to format-bytes 0.3
Simon Sapin <simon.sapin@octobus.net> [Fri, 17 Dec 2021 11:46:30 +0100] rev 48492
rust: Upgrade to format-bytes 0.3 This removes use of the proc-macro-hack crate, which is possible now that we don’t support Rust 1.41 to 1.44 anymore. This in turn fixes spurious errors reported by rust-analyser: https://github.com/rust-analyzer/rust-analyzer/issues/9606#issuecomment-919240134 Differential Revision: https://phab.mercurial-scm.org/D11938
Tue, 14 Dec 2021 20:13:10 -0500 pytype: stop excluding ssutil.py
Matt Harbison <matt_harbison@yahoo.com> [Tue, 14 Dec 2021 20:13:10 -0500] rev 48491
pytype: stop excluding ssutil.py Pytype simply can't distinguish the type for this one entry's value from the other values: File "/mnt/c/Users/Matt/hg/mercurial/sslutil.py", line 142, in _hostsettings: No attribute 'append' on None [attribute-error] In Optional[Union[Any, List[nothing], bool, bytes]] File "/mnt/c/Users/Matt/hg/mercurial/sslutil.py", line 142, in _hostsettings: No attribute 'append' on bool [attribute-error] In Optional[Union[Any, List[nothing], bool, bytes]] File "/mnt/c/Users/Matt/hg/mercurial/sslutil.py", line 142, in _hostsettings: No attribute 'append' on bytes [attribute-error] In Optional[Union[Any, List[nothing], bool, bytes]] File "/mnt/c/Users/Matt/hg/mercurial/sslutil.py", line 147, in _hostsettings: No attribute 'append' on None [attribute-error] In Optional[Union[Any, List[Tuple[Any, Any]], bool, bytes]] File "/mnt/c/Users/Matt/hg/mercurial/sslutil.py", line 147, in _hostsettings: No attribute 'append' on bool [attribute-error] In Optional[Union[Any, List[Tuple[Any, Any]], bool, bytes]] File "/mnt/c/Users/Matt/hg/mercurial/sslutil.py", line 147, in _hostsettings: No attribute 'append' on bytes [attribute-error] In Optional[Union[Any, List[Tuple[Any, Any]], bool, bytes]] Differential Revision: https://phab.mercurial-scm.org/D11931
Tue, 14 Dec 2021 19:13:30 -0500 pytype: stop excluding wireprotoserver.py
Matt Harbison <matt_harbison@yahoo.com> [Tue, 14 Dec 2021 19:13:30 -0500] rev 48490
pytype: stop excluding wireprotoserver.py The `config` entry is a 2 part tuple, which has `__iter__()`: File "/mnt/c/Users/Matt/hg/mercurial/wireprotoserver.py", line 253, in _availableapis: No attribute '__iter__' on Callable[[Any, Any], Any] [attribute-error] In Union[Callable[[Any, Any, Any, Any, Any], None], Callable[[Any, Any], Any]] File "/mnt/c/Users/Matt/hg/mercurial/wireprotoserver.py", line 253, in _availableapis: No attribute '__iter__' on Callable[[Any, Any, Any, Any, Any], None] [attribute-error] In Union[Callable[[Any, Any, Any, Any, Any], None], Callable[[Any, Any], Any]] Differential Revision: https://phab.mercurial-scm.org/D11930
Tue, 14 Dec 2021 18:36:07 -0500 pytype: stop excluding pycompat.py
Matt Harbison <matt_harbison@yahoo.com> [Tue, 14 Dec 2021 18:36:07 -0500] rev 48489
pytype: stop excluding pycompat.py Whatever issues were here seem to have been previously fixed. Differential Revision: https://phab.mercurial-scm.org/D11929
Tue, 14 Dec 2021 17:29:30 -0500 procutil: avoid an uninitialized variable usage on tempfile exception
Matt Harbison <matt_harbison@yahoo.com> [Tue, 14 Dec 2021 17:29:30 -0500] rev 48488
procutil: avoid an uninitialized variable usage on tempfile exception If `pycompat.unnamedtempfile()` raises an exception, it would have called `stdin.close()` in the `finally` block without it being initialized first. Differential Revision: https://phab.mercurial-scm.org/D11928
Tue, 14 Dec 2021 17:25:46 -0500 pytype: stop excluding procutil.py
Matt Harbison <matt_harbison@yahoo.com> [Tue, 14 Dec 2021 17:25:46 -0500] rev 48487
pytype: stop excluding procutil.py This avoids these false warnings: File "/mnt/c/Users/Matt/hg/mercurial/utils/procutil.py", line 78, in <module>: No attribute 'register' on Type[io.BufferedIOBase] [attribute-error] File "/mnt/c/Users/Matt/hg/mercurial/utils/procutil.py", line 117, in <module>: No attribute 'register' on Type[io.IOBase] [attribute-error] File "/mnt/c/Users/Matt/hg/mercurial/utils/procutil.py", line 770, in runbgcommandpy3: No attribute 'close' on int [attribute-error] In Union[IO[Union[bytes, str]], int] Differential Revision: https://phab.mercurial-scm.org/D11927
Tue, 14 Dec 2021 17:06:32 -0500 pytype: stop excluding chgserver.py
Matt Harbison <matt_harbison@yahoo.com> [Tue, 14 Dec 2021 17:06:32 -0500] rev 48486
pytype: stop excluding chgserver.py This teaches pytype about some lazy initialization, and avoids the following: File "/mnt/c/Users/Matt/hg/mercurial/chgserver.py", line 666, in _checkextensions: No attribute '_hashstate' on chgunixservicehandler [attribute-error] File "/mnt/c/Users/Matt/hg/mercurial/chgserver.py", line 672, in _checkextensions: No attribute '_hashstate' on chgunixservicehandler [attribute-error] File "/mnt/c/Users/Matt/hg/mercurial/chgserver.py", line 677, in _bind: No attribute '_realaddress' on chgunixservicehandler [attribute-error] File "/mnt/c/Users/Matt/hg/mercurial/chgserver.py", line 683, in _bind: No attribute '_realaddress' on chgunixservicehandler [attribute-error] File "/mnt/c/Users/Matt/hg/mercurial/chgserver.py", line 686, in _createsymlink: No attribute '_baseaddress' on chgunixservicehandler [attribute-error] File "/mnt/c/Users/Matt/hg/mercurial/chgserver.py", line 686, in _createsymlink: No attribute '_realaddress' on chgunixservicehandler [attribute-error] File "/mnt/c/Users/Matt/hg/mercurial/chgserver.py", line 688, in _createsymlink: No attribute '_baseaddress' on chgunixservicehandler [attribute-error] File "/mnt/c/Users/Matt/hg/mercurial/chgserver.py", line 689, in _createsymlink: No attribute '_realaddress' on chgunixservicehandler [attribute-error] File "/mnt/c/Users/Matt/hg/mercurial/chgserver.py", line 690, in _createsymlink: No attribute '_baseaddress' on chgunixservicehandler [attribute-error] Differential Revision: https://phab.mercurial-scm.org/D11926
Mon, 13 Dec 2021 22:46:43 -0500 pytype: stop excluding webcommands.py
Matt Harbison <matt_harbison@yahoo.com> [Mon, 13 Dec 2021 22:46:43 -0500] rev 48485
pytype: stop excluding webcommands.py I have no idea why, but asserting that each value added to `emptydirs` is not None didn't fix this: File "/mnt/c/Users/Matt/hg/mercurial/hgweb/webcommands.py", line 621, in dirlist: Function bytes.join was called with the wrong arguments [wrong-arg-types] Expected: (self, iterable: Iterable[bytes]) Actually passed: (self, iterable: List[None]) Differential Revision: https://phab.mercurial-scm.org/D11924
Mon, 13 Dec 2021 20:45:31 -0500 tests: drop an obsolete comment about a pytype failure
Matt Harbison <matt_harbison@yahoo.com> [Mon, 13 Dec 2021 20:45:31 -0500] rev 48484
tests: drop an obsolete comment about a pytype failure Differential Revision: https://phab.mercurial-scm.org/D11923
Mon, 13 Dec 2021 20:19:09 -0500 pytype: stop excluding patch.py
Matt Harbison <matt_harbison@yahoo.com> [Mon, 13 Dec 2021 20:19:09 -0500] rev 48483
pytype: stop excluding patch.py The underlying `email.generator.BytesGenerator` is documented as requiring an `fp` that accepts bytes, so I'm not sure why pytype is getting confused: File "/mnt/c/Users/Matt/hg/mercurial/patch.py", line 112, in msgfp: Function Generator.__init__ was called with the wrong arguments [wrong-arg-types] Expected: (self, outfp: TextIO, ...) Actually passed: (self, outfp: io.BytesIO, ...) Differential Revision: https://phab.mercurial-scm.org/D11922
Mon, 13 Dec 2021 19:34:06 -0500 pytype: stop excluding statprof.py
Matt Harbison <matt_harbison@yahoo.com> [Mon, 13 Dec 2021 19:34:06 -0500] rev 48482
pytype: stop excluding statprof.py This seems to have worked fine before (at least on Linux). We could just add suppression comments, but this file already imports from the mercurial package, which seems to prevent this from running as a standalone program because of the relative import of `pycompat`. PyCharm isn't happy either way. File "/mnt/c/Users/Matt/hg/mercurial/statprof.py", line 501, in display: Function TextIO.write was called with the wrong arguments [wrong-arg-types] Expected: (self, s: str) Actually passed: (self, s: bytes) Called from (traceback): line 1091, in main File "/mnt/c/Users/Matt/hg/mercurial/statprof.py", line 501, in display: Function TextIO.write was called with the wrong arguments [wrong-arg-types] Expected: (self, s: str) Actually passed: (self, s: bytes) Called from (traceback): line 431, in profile File "/mnt/c/Users/Matt/hg/mercurial/statprof.py", line 522, in display: Function TextIO.write was called with the wrong arguments [wrong-arg-types] Expected: (self, s: str) Actually passed: (self, s: bytes) Called from (traceback): line 1091, in main File "/mnt/c/Users/Matt/hg/mercurial/statprof.py", line 522, in display: Function TextIO.write was called with the wrong arguments [wrong-arg-types] Expected: (self, s: str) Actually passed: (self, s: bytes) Called from (traceback): line 431, in profile File "/mnt/c/Users/Matt/hg/mercurial/statprof.py", line 523, in display: Function TextIO.write was called with the wrong arguments [wrong-arg-types] Expected: (self, s: str) Actually passed: (self, s: bytes) Called from (traceback): line 1091, in main File "/mnt/c/Users/Matt/hg/mercurial/statprof.py", line 523, in display: Function TextIO.write was called with the wrong arguments [wrong-arg-types] Expected: (self, s: str) Actually passed: (self, s: bytes) Called from (traceback): line 431, in profile File "/mnt/c/Users/Matt/hg/mercurial/statprof.py", line 524, in display: Function TextIO.write was called with the wrong arguments [wrong-arg-types] Expected: (self, s: str) Actually passed: (self, s: bytes) Called from (traceback): line 1091, in main File "/mnt/c/Users/Matt/hg/mercurial/statprof.py", line 524, in display: Function TextIO.write was called with the wrong arguments [wrong-arg-types] Expected: (self, s: str) Actually passed: (self, s: bytes) Called from (traceback): line 431, in profile File "/mnt/c/Users/Matt/hg/mercurial/statprof.py", line 796, in _write: Function TextIO.write was called with the wrong arguments [wrong-arg-types] Expected: (self, s: str) Actually passed: (self, s: bytes) Differential Revision: https://phab.mercurial-scm.org/D11921
Mon, 13 Dec 2021 17:59:36 -0500 statprof: convert a few exception byte strings to str
Matt Harbison <matt_harbison@yahoo.com> [Mon, 13 Dec 2021 17:59:36 -0500] rev 48481
statprof: convert a few exception byte strings to str That way these display without the b'' prefix. Differential Revision: https://phab.mercurial-scm.org/D11920
Mon, 13 Dec 2021 16:42:36 -0500 pytype: stop excluding wireprotov2server.py
Matt Harbison <matt_harbison@yahoo.com> [Mon, 13 Dec 2021 16:42:36 -0500] rev 48480
pytype: stop excluding wireprotov2server.py This fixes: File "/mnt/c/Users/Matt/hg/mercurial/wireprotov2server.py", line 584, in _capabilitiesv2: unsupported operand type(s) for item assignment: Set[bytes] [unsupported-operands] No attribute '__setitem__' on Set[bytes] File "/mnt/c/Users/Matt/hg/mercurial/wireprotov2server.py", line 611, in _capabilitiesv2: No attribute 'append' on dict [attribute-error] In Union[List[bytes], List[nothing], dict] Called from (traceback): line 543, in httpv2apidescriptor Differential Revision: https://phab.mercurial-scm.org/D11919
Mon, 13 Dec 2021 14:43:10 -0500 pytype: stop excluding stringutil.py
Matt Harbison <matt_harbison@yahoo.com> [Mon, 13 Dec 2021 14:43:10 -0500] rev 48479
pytype: stop excluding stringutil.py This fixes the following: File "/mnt/c/Users/Matt/hg/mercurial/utils/stringutil.py", line 267, in prettyrepr: Function bytes.startswith expects 2 arg(s), got 3 [wrong-arg-count] Expected: (self, prefix) Actually passed: (self, prefix, _) File "/mnt/c/Users/Matt/hg/mercurial/utils/stringutil.py", line 695, in escapestr: No attribute 'escape_encode' on module 'codecs' [module-attr] File "/mnt/c/Users/Matt/hg/mercurial/utils/stringutil.py", line 699, in unescapestr: No attribute 'escape_decode' on module 'codecs' [module-attr] Differential Revision: https://phab.mercurial-scm.org/D11918
Mon, 13 Dec 2021 00:25:38 -0500 pytype: stop excluding cmdutil.py
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
Mon, 13 Dec 2021 00:04:53 -0500 pytype: stop excluding copies.py
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
Sun, 12 Dec 2021 22:29:46 -0500 copies: fix some documentation typos
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
Sun, 12 Dec 2021 22:24:16 -0500 copies: drop an unused variable
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
Sun, 12 Dec 2021 22:09:13 -0500 pytype: stop excluding lsprof.py
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
Sun, 12 Dec 2021 21:10:02 -0500 pytype: stop excluding changegroup.py
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
Sun, 12 Dec 2021 20:01:05 -0500 pytype: stop excluding upgrade.py
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
Tue, 14 Dec 2021 20:36:36 +0100 rhg: Skip reading the contents of ambiguous files in some cases
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
Tue, 14 Dec 2021 19:47:33 +0100 rhg: Mark it as expected that the issue6528 bug is not reproduced
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
Tue, 14 Dec 2021 13:41:34 -0800 filemerge: remove leftover documentation of removed argument
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
Mon, 13 Dec 2021 14:44:16 -0500 merge with stable
Matt Harbison <matt_harbison@yahoo.com> [Mon, 13 Dec 2021 14:44:16 -0500] rev 48468
merge with stable
Mon, 13 Dec 2021 14:37:16 +0100 rhg: Print "bad match" errors in rhg status
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
Tue, 07 Dec 2021 15:14:08 +0100 share: make it possible to control the working copy format variant
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
Tue, 07 Dec 2021 14:51:45 +0100 share: move the requirement initialisation code around
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
Wed, 08 Dec 2021 05:35:32 +0100 test: use `hg debugrequires` instead of `cat` in some tests
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
Wed, 08 Dec 2021 05:42:01 +0100 test: simplify `debugformat` matching in test-phases.t
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
Tue, 07 Dec 2021 23:49:35 +0100 test: simplify `debugformat` matching in test-copies-chain-merge
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
Tue, 07 Dec 2021 15:53:55 -0800 status: when extracting arguments from `opts`, use the same default values
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
Tue, 07 Dec 2021 15:48:22 -0800 directaccess: fix uses of commands.status() that don't go through flag parsing
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
Sun, 07 Nov 2021 16:25:42 -0500 test: add test for a former race resulting in bad dirstate
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
Tue, 07 Dec 2021 18:57:43 +0000 rhg: fix a crash on non-generaldelta revlogs
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
Tue, 07 Dec 2021 18:12:13 +0000 rhg: centralize index header parsing
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
Tue, 07 Dec 2021 17:50:19 +0000 rhg: demonstrate that rhg breaks on non-generaldelta revlogs
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
Fri, 10 Dec 2021 23:08:25 +0100 tests: add a short `sleep` in test-status.t
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
Fri, 10 Dec 2021 16:18:58 +0100 rhg: Add support for `rhg status --copies`
Simon Sapin <simon.sapin@octobus.net> [Fri, 10 Dec 2021 16:18:58 +0100] rev 48454
rhg: Add support for `rhg status --copies` Copy sources are collected during `status()` rather than after the fact like in Python, because `status()` takes a `&mut` exclusive reference to the dirstate map (in order to potentially mutate it for directory mtimes) and returns `Cow<'_, HgPath>` that borrow the dirstate map. Even though with `Cow` only some shared borrows remain, the still extend the same lifetime of the initial `&mut` so the dirstate map cannot be borrowed again to access copy sources after the fact: https://doc.rust-lang.org/nomicon/lifetime-mismatch.html#limits-of-lifetimes Additionally, collecting copy sources during the dirstate tree traversal that `status()` already does avoids the cost of another traversal or other lookups (though I haven’t benchmarked that cost). Differential Revision: https://phab.mercurial-scm.org/D11899
Fri, 10 Dec 2021 16:57:39 +0100 rhg: refactor relativize_path into a struct + method
Simon Sapin <simon.sapin@octobus.net> [Fri, 10 Dec 2021 16:57:39 +0100] rev 48453
rhg: refactor relativize_path into a struct + method … instead of a function that takes an iterator and a callback. Differential Revision: https://phab.mercurial-scm.org/D11898
Fri, 10 Dec 2021 16:31:16 +0100 rhg: refactor display_status_paths with a struct for common arguments
Simon Sapin <simon.sapin@octobus.net> [Fri, 10 Dec 2021 16:31:16 +0100] rev 48452
rhg: refactor display_status_paths with a struct for common arguments Differential Revision: https://phab.mercurial-scm.org/D11897
Fri, 10 Dec 2021 14:27:00 +0100 rhg: Add support for ui.ignore and ui.ignore.* config
Simon Sapin <simon.sapin@octobus.net> [Fri, 10 Dec 2021 14:27:00 +0100] rev 48451
rhg: Add support for ui.ignore and ui.ignore.* config This fixes some but not all failures in `tests/test-hgignore.t` when running with `rhg status` enabled. Differential Revision: https://phab.mercurial-scm.org/D11907
Fri, 10 Dec 2021 17:20:21 +0100 doc: remove a spurious ^L in some doc
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 10 Dec 2021 17:20:21 +0100] rev 48450
doc: remove a spurious ^L in some doc This was wrongly introduced in D11784. Differential Revision: https://phab.mercurial-scm.org/D11896
Mon, 06 Dec 2021 21:30:32 +0100 upgrade: drop some dead code
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 06 Dec 2021 21:30:32 +0100] rev 48449
upgrade: drop some dead code Everything done by this block is now done by earlier code. So we don't need it anymore. Differential Revision: https://phab.mercurial-scm.org/D11872
Mon, 06 Dec 2021 17:54:39 +0100 upgrade: only process revlogs that needs it by default
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 06 Dec 2021 17:54:39 +0100] rev 48448
upgrade: only process revlogs that needs it by default We have more and more requirement that does not affect revlog or that only affect some of them. It is silly to force a full processing of all revlog to juste move the requirement around, or to simply rewrite the dirstate. So now, only the revlog that needs to be touched will be touched. Unless the --changelog & al flags are used. Differential Revision: https://phab.mercurial-scm.org/D11871
Mon, 06 Dec 2021 17:13:26 +0100 upgrade: issue a message when a revlog type has to be upgraded
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 06 Dec 2021 17:13:26 +0100] rev 48447
upgrade: issue a message when a revlog type has to be upgraded This is more explicite and prepare for a smoother transition to smarter picking of the revlog we will process. Differential Revision: https://phab.mercurial-scm.org/D11870
Mon, 06 Dec 2021 17:12:21 +0100 upgrade: explicitly warn when a `--no-xxx` flag is overwritten
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 06 Dec 2021 17:12:21 +0100] rev 48446
upgrade: explicitly warn when a `--no-xxx` flag is overwritten Some format upgrade/downgrades -needs- revlog to be recomputed. So we now detect that individually and warn when it contradict explicitly passed flag. This is part of a larger series to make `debugupgraderepo` smarter about which revlog it picks by default. Differential Revision: https://phab.mercurial-scm.org/D11869
Mon, 06 Dec 2021 14:40:13 +0100 upgrade: make the list of explicitly specified revlog a dict
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 06 Dec 2021 14:40:13 +0100] rev 48445
upgrade: make the list of explicitly specified revlog a dict This makes various logic simpler and will help making future patch clearer. Differential Revision: https://phab.mercurial-scm.org/D11868
Mon, 06 Dec 2021 11:59:48 +0100 upgrade: move the revlog selection code lower down the chain
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 06 Dec 2021 11:59:48 +0100] rev 48444
upgrade: move the revlog selection code lower down the chain We about about to make revlog section smarter. Moving the code around will make the next changesets clearer. Differential Revision: https://phab.mercurial-scm.org/D11867
Thu, 09 Dec 2021 10:55:17 +0100 rhg: Set second_ambiguous as needed in post-status fixup
Simon Sapin <simon.sapin@octobus.net> [Thu, 09 Dec 2021 10:55:17 +0100] rev 48443
rhg: Set second_ambiguous as needed in post-status fixup This fixes an intermittent bug that manifested only in test-revert.t, and unfortunately not on CI. On a fast enough machine we could have: 1. A file is modified 2. `rhg status` writes an updated dirstate-v1 3. The same file is modified again … all within the same integer second. Because the dirstate-v1 file format does not store sub-second precision, step 2 must write the file’s mtime as "unknown" because of the possibility of step 3. However, most of the code now handles timestamps with nanosecond precision in order to take advantage of it in dirstate-v2. `second_ambiguous` must be set for timestamps that become ambiguous if sub-second precision is dropped (such as through serialization in dirstate-v1 format). Differential Revision: https://phab.mercurial-scm.org/D11889
Thu, 09 Dec 2021 10:23:41 +0100 dirstate: Document Timestamp.second_ambiguous
Simon Sapin <simon.sapin@octobus.net> [Thu, 09 Dec 2021 10:23:41 +0100] rev 48442
dirstate: Document Timestamp.second_ambiguous Differential Revision: https://phab.mercurial-scm.org/D11888
Mon, 13 Dec 2021 00:18:31 -0500 hghave: fix the check for suid on platforms lacking support stable
Matt Harbison <matt_harbison@yahoo.com> [Mon, 13 Dec 2021 00:18:31 -0500] rev 48441
hghave: fix the check for suid on platforms lacking support The mac tests were raising an AttributeError without the default arg. Differential Revision: https://phab.mercurial-scm.org/D11906
Sun, 12 Dec 2021 19:36:11 -0500 upgrade: byteify a few error messages stable
Matt Harbison <matt_harbison@yahoo.com> [Sun, 12 Dec 2021 19:36:11 -0500] rev 48440
upgrade: byteify a few error messages These were flagged by pytype (which is currently disabled on this file due to another failure). Differential Revision: https://phab.mercurial-scm.org/D11905
Tue, 07 Dec 2021 12:34:58 +0100 rhg: support the new extension suboptions syntax
Raphaël Gomès <rgomes@octobus.net> [Tue, 07 Dec 2021 12:34:58 +0100] rev 48439
rhg: support the new extension suboptions syntax See inline comments Differential Revision: https://phab.mercurial-scm.org/D11874
Wed, 08 Dec 2021 10:14:37 +0100 branching: merge stable into default
Raphaël Gomès <rgomes@octobus.net> [Wed, 08 Dec 2021 10:14:37 +0100] rev 48438
branching: merge stable into default
Mon, 06 Dec 2021 10:08:04 +0100 dirstate-v2: fix upgrade on an empty repository stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 06 Dec 2021 10:08:04 +0100] rev 48437
dirstate-v2: fix upgrade on an empty repository This used to crash as the dirstate file does not exist in this case. Differential Revision: https://phab.mercurial-scm.org/D11866
Mon, 06 Dec 2021 10:52:40 +0100 dirstate-v2: test upgrade without rust too stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 06 Dec 2021 10:52:40 +0100] rev 48436
dirstate-v2: test upgrade without rust too There is no reason to gate this anymore. Differential Revision: https://phab.mercurial-scm.org/D11865
Tue, 07 Dec 2021 10:03:00 +0100 upgrade: don't use `dd status=none` in the test stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 07 Dec 2021 10:03:00 +0100] rev 48435
upgrade: don't use `dd status=none` in the test This breaks on Windows, so lets use `>2 /dev/null` like in the other tests. Differential Revision: https://phab.mercurial-scm.org/D11873
Mon, 06 Dec 2021 10:23:51 +0100 test-upgrade: narrow the `debugformat` call when upgrading to dirstate-v2 stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 06 Dec 2021 10:23:51 +0100] rev 48434
test-upgrade: narrow the `debugformat` call when upgrading to dirstate-v2 This will make the test less noisy when new requirement are added. Differential Revision: https://phab.mercurial-scm.org/D11864
Mon, 06 Dec 2021 12:30:54 -0800 filemerge: remove `premerge` argument from `_makebackup()`
Martin von Zweigbergk <martinvonz@google.com> [Mon, 06 Dec 2021 12:30:54 -0800] rev 48433
filemerge: remove `premerge` argument from `_makebackup()` We now always pass `True`, so there's no need to pass it. Differential Revision: https://phab.mercurial-scm.org/D11863
Fri, 03 Dec 2021 22:45:35 -0800 filemerge: inline `_filemerge()` into `filemerge()`
Martin von Zweigbergk <martinvonz@google.com> [Fri, 03 Dec 2021 22:45:35 -0800] rev 48432
filemerge: inline `_filemerge()` into `filemerge()` The caller is now trivial, so the indirection is pointless. Differential Revision: https://phab.mercurial-scm.org/D11860
Fri, 03 Dec 2021 21:41:43 -0800 filemerge: make `_filemerge()` do both premerge and merge
Martin von Zweigbergk <martinvonz@google.com> [Fri, 03 Dec 2021 21:41:43 -0800] rev 48431
filemerge: make `_filemerge()` do both premerge and merge This patch removes the `premerge` argument from `_filemerge()` and makes it do both the "premerge" and "merge" steps without the caller having to call it twice. Differential Revision: https://phab.mercurial-scm.org/D11859
Fri, 03 Dec 2021 16:21:46 -0800 filemerge: merge `premerge()` into `filemerge()`
Martin von Zweigbergk <martinvonz@google.com> [Fri, 03 Dec 2021 16:21:46 -0800] rev 48430
filemerge: merge `premerge()` into `filemerge()` Differential Revision: https://phab.mercurial-scm.org/D11858
Fri, 03 Dec 2021 15:43:54 -0800 mergestate: inline `_resolve()` into `resolve()`
Martin von Zweigbergk <martinvonz@google.com> [Fri, 03 Dec 2021 15:43:54 -0800] rev 48429
mergestate: inline `_resolve()` into `resolve()` The caller is now trivial, so the indirection is pointless. Differential Revision: https://phab.mercurial-scm.org/D11857
Fri, 03 Dec 2021 13:53:02 -0800 mergestate: make `_resolve()` do both preresolve and resolve
Martin von Zweigbergk <martinvonz@google.com> [Fri, 03 Dec 2021 13:53:02 -0800] rev 48428
mergestate: make `_resolve()` do both preresolve and resolve This patch removes the `preresolve` argument from `_resolve()` and makes it do both the "preresolve" and "resolve" steps without the caller having to call it twice. Differential Revision: https://phab.mercurial-scm.org/D11856
Thu, 02 Dec 2021 22:59:36 -0800 mergestate: merge `preresolve()` into `resolve()`
Martin von Zweigbergk <martinvonz@google.com> [Thu, 02 Dec 2021 22:59:36 -0800] rev 48427
mergestate: merge `preresolve()` into `resolve()` The separation between `preresolve()` and `resolve()` was something added for the "merge driver" feature. Since we removed that in 32ce4cbaec4b (mergedriver: delete it, 2020-09-17), we don't need the separation anymore. More cleanups will follow. Differential Revision: https://phab.mercurial-scm.org/D11855
Fri, 03 Dec 2021 21:50:25 -0800 tests: remove unnecessary explicit args from `failfilemerge.py`
Martin von Zweigbergk <martinvonz@google.com> [Fri, 03 Dec 2021 21:50:25 -0800] rev 48426
tests: remove unnecessary explicit args from `failfilemerge.py` The `failfilemerge()` function always raises an exception without looking at its arguments, so let's use `*args` and `**kwargs`. Differential Revision: https://phab.mercurial-scm.org/D11854
Mon, 29 Nov 2021 23:00:29 -0800 simplemerge: set `conflicts` earlier for :union tool
Martin von Zweigbergk <martinvonz@google.com> [Mon, 29 Nov 2021 23:00:29 -0800] rev 48425
simplemerge: set `conflicts` earlier for :union tool Differential Revision: https://phab.mercurial-scm.org/D11853
Thu, 25 Nov 2021 18:26:50 +0100 downgrade: don't assume existence of nodemap files when downgrading stable
Raphaël Gomès <rgomes@octobus.net> [Thu, 25 Nov 2021 18:26:50 +0100] rev 48424
downgrade: don't assume existence of nodemap files when downgrading Persistent nodemap files might not exist on a fresh repository, so ignore the potential missing file errors. Differential Revision: https://phab.mercurial-scm.org/D11806
Fri, 26 Nov 2021 11:53:54 +0100 typo: s/unkown/unknown across the codebase
Raphaël Gomès <rgomes@octobus.net> [Fri, 26 Nov 2021 11:53:54 +0100] rev 48423
typo: s/unkown/unknown across the codebase Differential Revision: https://phab.mercurial-scm.org/D11807
Thu, 25 Nov 2021 18:33:51 +0100 rhg: Update the dirstate on disk after status
Simon Sapin <simon.sapin@octobus.net> [Thu, 25 Nov 2021 18:33:51 +0100] rev 48422
rhg: Update the dirstate on disk after status Differential Revision: https://phab.mercurial-scm.org/D11840
Thu, 02 Dec 2021 15:10:03 +0100 rhg: Add Repo::write_dirstate
Simon Sapin <simon.sapin@octobus.net> [Thu, 02 Dec 2021 15:10:03 +0100] rev 48421
rhg: Add Repo::write_dirstate This method is not used yet. It saves to disk any mutation that was done to the `Repo`’s dirstate through `Repo::dirstate_map_mut`. It takes care of dirstate-v1 v.s. dirstate-v2, dockets, data files, appending when possible, etc. Differential Revision: https://phab.mercurial-scm.org/D11839
Thu, 02 Dec 2021 12:05:36 +0100 rhg: Add lazy/cached dirstate data file ID parsing on Repo
Simon Sapin <simon.sapin@octobus.net> [Thu, 02 Dec 2021 12:05:36 +0100] rev 48420
rhg: Add lazy/cached dirstate data file ID parsing on Repo The `dirstate_parents`, `dirstate_data_file_uuid`, and `dirstate_map` members of `Repo` can be access in any order and the `.hg/dirstate` file should only be opened once. Differential Revision: https://phab.mercurial-scm.org/D11838
Mon, 29 Nov 2021 19:00:11 +0100 rhg: Make Repo::dirstate_parents a LazyCell
Simon Sapin <simon.sapin@octobus.net> [Mon, 29 Nov 2021 19:00:11 +0100] rev 48419
rhg: Make Repo::dirstate_parents a LazyCell Unify with the same abstraction used for other lazily-initialized components Differential Revision: https://phab.mercurial-scm.org/D11837
Mon, 29 Nov 2021 18:46:04 +0100 rust: Add Vfs::write_atomic
Simon Sapin <simon.sapin@octobus.net> [Mon, 29 Nov 2021 18:46:04 +0100] rev 48418
rust: Add Vfs::write_atomic This method writes to a temporary file then renames in place Differential Revision: https://phab.mercurial-scm.org/D11836
Mon, 22 Mar 2021 09:07:10 +0100 rhg: Initial repository locking
Simon Sapin <simon.sapin@octobus.net> [Mon, 22 Mar 2021 09:07:10 +0100] rev 48417
rhg: Initial repository locking Initial Rust implementation of locking based on the `.hg/wlock` symlink (or file), with lock breaking when the recorded pid and hostname show that a lock was left by a local process that is not running anymore (as it might have been killed). Differential Revision: https://phab.mercurial-scm.org/D11835
Mon, 29 Nov 2021 17:37:08 +0100 rust: Serializing a DirstateMap does not mutate it anymore
Simon Sapin <simon.sapin@octobus.net> [Mon, 29 Nov 2021 17:37:08 +0100] rev 48416
rust: Serializing a DirstateMap does not mutate it anymore Differential Revision: https://phab.mercurial-scm.org/D11834
Fri, 26 Nov 2021 15:07:59 +0100 rhg: don't run `blackbox` if not activated
Raphaël Gomès <rgomes@octobus.net> [Fri, 26 Nov 2021 15:07:59 +0100] rev 48415
rhg: don't run `blackbox` if not activated You currently have no way of turning off blackbox. Aside from being a bug, this can be annoying if you use `rhg` in your shell prompt, but also because the current implementation of blackbox is quite slow due to `user` querying. Differential Revision: https://phab.mercurial-scm.org/D11813
Fri, 26 Nov 2021 15:05:58 +0100 rust: add function to check if an extension is enabled
Raphaël Gomès <rgomes@octobus.net> [Fri, 26 Nov 2021 15:05:58 +0100] rev 48414
rust: add function to check if an extension is enabled This will be used in the next patch Differential Revision: https://phab.mercurial-scm.org/D11812
Fri, 03 Dec 2021 15:06:40 +0100 dirstate: remove unused method
Raphaël Gomès <rgomes@octobus.net> [Fri, 03 Dec 2021 15:06:40 +0100] rev 48413
dirstate: remove unused method Its last usage was inlined in `merge.py`. Differential Revision: https://phab.mercurial-scm.org/D11849
Tue, 07 Dec 2021 15:01:30 +0100 fsmonitor: fix criteria for nonnormalset computation stable
Raphaël Gomès <rgomes@octobus.net> [Tue, 07 Dec 2021 15:01:30 +0100] rev 48412
fsmonitor: fix criteria for nonnormalset computation ... oops. Differential Revision: https://phab.mercurial-scm.org/D11875
Mon, 06 Dec 2021 11:10:59 +0100 fsmonitor: incorporate fixes for Python 3.10 (issue6612) stable
Raphaël Gomès <rgomes@octobus.net> [Mon, 06 Dec 2021 11:10:59 +0100] rev 48411
fsmonitor: incorporate fixes for Python 3.10 (issue6612) Differential Revision: https://phab.mercurial-scm.org/D11862
Sat, 04 Dec 2021 03:51:33 +0100 python2-compat: fix extensions' tests on python2
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 04 Dec 2021 03:51:33 +0100] rev 48410
python2-compat: fix extensions' tests on python2 They are minor output different to be taken in account. Differential Revision: https://phab.mercurial-scm.org/D11861
Tue, 16 Nov 2021 11:53:58 +0000 rhg: add support for narrow clones and sparse checkouts
Arseniy Alekseyev <aalekseyev@janestreet.com> [Tue, 16 Nov 2021 11:53:58 +0000] rev 48409
rhg: add support for narrow clones and sparse checkouts This adds a minimal support that can be implemented without parsing the narrowspec. We can parse the narrowspec and add support for more operations later. The reason we need so few code changes is as follows: Most operations need no special treatment of sparse because some of them only read dirstate (`rhg files` without `-r`), which bakes in the filtering, some of them only read store (`rhg files -r`, `rhg cat`), and some of them read no data at all (`rhg root`, `rhg debugrequirements`). `status` is the command that might care about sparse, so we just disable rhg on it. For narrow clones, `rhg files` clearly needs the narrowspec to work correctly, so we fall back. `rhg cat` seems to work consistently with `hg cat` if the file exists. If the file is hidden by narrow spec, the error message is different and confusing, so that's something that we should improve in follow-up patches. Differential Revision: https://phab.mercurial-scm.org/D11764
Fri, 03 Dec 2021 14:36:40 +0100 update: reformat the `commands.update.check` help
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 03 Dec 2021 14:36:40 +0100] rev 48408
update: reformat the `commands.update.check` help This make the various option clearer. Differential Revision: https://phab.mercurial-scm.org/D11852
Fri, 03 Dec 2021 12:03:23 +0100 update: properly overwrite `check` config with `--no-` variants
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 03 Dec 2021 12:03:23 +0100] rev 48407
update: properly overwrite `check` config with `--no-` variants Before this change `--merge` override `commands.update.check=abort/noconflict`, and `--check` "override" `commands.update.check=none/linear`. However the `--no-merge` and `--no-check` version where not doing anything. The `--no-` two flags now behave properly. Differential Revision: https://phab.mercurial-scm.org/D11851
Fri, 03 Dec 2021 12:19:36 +0100 update: add a test for `--merge` overriding the "abort" config
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 03 Dec 2021 12:19:36 +0100] rev 48406
update: add a test for `--merge` overriding the "abort" config I don't see this behavior tested anywhere. Differential Revision: https://phab.mercurial-scm.org/D11850
Fri, 03 Dec 2021 12:01:00 +0100 update: use long version of the flag in the test
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 03 Dec 2021 12:01:00 +0100] rev 48405
update: use long version of the flag in the test This helps readability and searchability. Differential Revision: https://phab.mercurial-scm.org/D11848
Mon, 22 Nov 2021 10:47:12 +0100 backout: backed out changeset 5d83a40cd3f8
Raphaël Gomès <rgomes@octobus.net> [Mon, 22 Nov 2021 10:47:12 +0100] rev 48404
backout: backed out changeset 5d83a40cd3f8 This is the re-send of the backout in D11757 that I accidentally queued. I'll rewrite the original commit message: ...sigh We do not have Python 3 packaging for thg on Windows where the vast majority of of users use the thg installer for Mercurial. Until this is done (hopefully this cycle), we're keeping Python. (end of the old commit message) On top of this, we have a solid lead to have competent people take care of this packaging issue for us in time for the 6.1 release, which is really the main reason for us to wait. We're trying our best to make this work, so please bear with us. Differential Revision: https://phab.mercurial-scm.org/D11770
Wed, 24 Nov 2021 05:00:28 +0100 status: keep second-ambiguous mtimes during fixup
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 24 Nov 2021 05:00:28 +0100] rev 48403
status: keep second-ambiguous mtimes during fixup Now that we support the feature, we can keep "second ambiguous" mtime during the fixup phase. These are the mtime that would be ambiguous if we did not had sub-second précions. See the v2 format documentation for details. Differential Revision: https://phab.mercurial-scm.org/D11847
Wed, 24 Nov 2021 04:43:57 +0100 dirstate-item: make sure we load `mtime-second-ambiguous` from disk
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 24 Nov 2021 04:43:57 +0100] rev 48402
dirstate-item: make sure we load `mtime-second-ambiguous` from disk Now that we support the associated logic, we can safely load it from it. It is no longer necessary to ignore the stored mtime when the flag is encountered. Differential Revision: https://phab.mercurial-scm.org/D11846
Wed, 24 Nov 2021 05:00:06 +0100 dirstate-item: make sure we set the mtime-second-ambiguous on v2 write
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 24 Nov 2021 05:00:06 +0100] rev 48401
dirstate-item: make sure we set the mtime-second-ambiguous on v2 write We want to preserve the second-ambiguity alongside the ambiguous mtime. So we use the decimated flag for that. note: the C code was already doing so. No change was needed to it. Differential Revision: https://phab.mercurial-scm.org/D11845
Wed, 24 Nov 2021 04:59:48 +0100 dirstate-item: ignore mtime to write v1 when `mtime-second-ambiguous` is set
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 24 Nov 2021 04:59:48 +0100] rev 48400
dirstate-item: ignore mtime to write v1 when `mtime-second-ambiguous` is set We cannot preserve that information in the v1 format so that mtime is ambiguous. Differential Revision: https://phab.mercurial-scm.org/D11844
Wed, 24 Nov 2021 04:51:05 +0100 dirstate-item: implement the comparison logic for mtime-second-ambiguous
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 24 Nov 2021 04:51:05 +0100] rev 48399
dirstate-item: implement the comparison logic for mtime-second-ambiguous If the flag is set we now process it properly. We "just" need to actually set it and persist it. Differential Revision: https://phab.mercurial-scm.org/D11843
Wed, 24 Nov 2021 04:40:00 +0100 dirstate-item: add a "second_ambiguous` flag in the mtime tuple
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 24 Nov 2021 04:40:00 +0100] rev 48398
dirstate-item: add a "second_ambiguous` flag in the mtime tuple This will be used to support the `mtime-second-ambiguous` flag from dirstate v2. See format documentation for details. For now, we only make it possible to store the information, no other logic have been added. Differential Revision: https://phab.mercurial-scm.org/D11842
Tue, 23 Nov 2021 19:27:17 +0100 dirstate: drop comparison primitive on the timestamp class
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 23 Nov 2021 19:27:17 +0100] rev 48397
dirstate: drop comparison primitive on the timestamp class All comparison are now managed without using operator : - the status mtime comparisons is handled by the DirstateItem, - the fixup reliability check, - the update "hack". So we no longer needs the operator and should discourage its usage. Differential Revision: https://phab.mercurial-scm.org/D11841
Tue, 23 Nov 2021 18:13:33 +0100 largefile: use the proper "mtime boundary" logic during fixup
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 23 Nov 2021 18:13:33 +0100] rev 48396
largefile: use the proper "mtime boundary" logic during fixup This will prevent ambiguous cache entry to be used in racy situation. This fix flakiness in test and some real live misbehavior. Differential Revision: https://phab.mercurial-scm.org/D11800
Tue, 23 Nov 2021 18:03:51 +0100 status: move the boundary comparison logic within the timestamp module
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 23 Nov 2021 18:03:51 +0100] rev 48395
status: move the boundary comparison logic within the timestamp module Some extensions will need it too. So lets isolate the logic. It also makes things clearer. Differential Revision: https://phab.mercurial-scm.org/D11799
Tue, 23 Nov 2021 18:11:42 +0100 tests: remove potential mtime ambiguity in a dirstate test
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 23 Nov 2021 18:11:42 +0100] rev 48394
tests: remove potential mtime ambiguity in a dirstate test If the test was fast enough, some mtime where not stored. We now wait long enough to ensure the mtime is no longer ambiguous. Differential Revision: https://phab.mercurial-scm.org/D11798
Fri, 19 Nov 2021 03:03:01 +0100 dirstate: cleanup remaining of "now" during write
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 19 Nov 2021 03:03:01 +0100] rev 48393
dirstate: cleanup remaining of "now" during write Since the whole `need_delay` have been removed, we no longer need this. Differential Revision: https://phab.mercurial-scm.org/D11797
Fri, 19 Nov 2021 03:04:42 +0100 dirstate: remove need_delay logic
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 19 Nov 2021 03:04:42 +0100] rev 48392
dirstate: remove need_delay logic Now that all¹ stored mtime are non ambiguous, we no longer need to apply the `need_delay` step. The need delay logic was not great are mtime gathered during longer operation could be ambiguous but younger than the `dirstate.write` call time. So, we don't need that logic anymore and can drop it This make the code much simpler. The code related to the test extension faking the dirstate write is now obsolete and associated test will be migrated as follow up. They currently do not break. [1] except the ones from `hg update`, but `need_delay` no longer help for them either. Differential Revision: https://phab.mercurial-scm.org/D11796
Mon, 25 Oct 2021 11:36:22 +0200 dirstate: remove `lastnormaltime` mechanism
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 25 Oct 2021 11:36:22 +0200] rev 48391
dirstate: remove `lastnormaltime` mechanism This is now redundant with the new, simpler `mtime_boundary` one. Differential Revision: https://phab.mercurial-scm.org/D11795
Thu, 18 Nov 2021 13:12:40 +0100 status: use filesystem time boundary to invalidate racy mtime
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 18 Nov 2021 13:12:40 +0100] rev 48390
status: use filesystem time boundary to invalidate racy mtime We record the filesystem time at the start of the status walk and use that as a boundary to detect files that might be modified during (or right after) the status run without the mtime allowing that edition to be detected. We currently do this at a second precision. In a later patch, we will use nanosecond precision when available. To cope with "broken" time on the file system where file could be in the future, we also keep mtime for file over one day in the future. See inline comment for details. Large file tests get a bit more confused as we reduce the odds for race condition. As a "side effect", the win32text extension is happy again. Differential Revision: https://phab.mercurial-scm.org/D11794
Thu, 18 Nov 2021 15:00:13 +0100 test: use a different timestamp for the updated file
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 18 Nov 2021 15:00:13 +0100] rev 48389
test: use a different timestamp for the updated file In the test we want to trigger a write after the underlying dirstate changed. To do so, we need a write. And as we are about to make dirstate update smarter we need to meddle with the script a bit to make sure there will be a write. Differential Revision: https://phab.mercurial-scm.org/D11793
Tue, 23 Nov 2021 03:22:30 +0100 win32text: drop associated dirstate cache information on revert
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 23 Nov 2021 03:22:30 +0100] rev 48388
win32text: drop associated dirstate cache information on revert Otherwise the could get size from one version of the file while the on-disk version is still clean but with another size. This fix the previously introduced error. Differential Revision: https://phab.mercurial-scm.org/D11792
Wed, 17 Nov 2021 20:27:27 +0100 dirstate: stop gathering parentfiledata in update_file
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 17 Nov 2021 20:27:27 +0100] rev 48387
dirstate: stop gathering parentfiledata in update_file Gathering information here assume that they are valid cache information for a clean file. It is true most of the time, but not garanteed. Accurate data can still be explicitly provided. We drop the spontaneous and will let the next `hg status` call record actual information. Differential Revision: https://phab.mercurial-scm.org/D11791
Wed, 17 Nov 2021 20:26:33 +0100 dirstate: stop gathering parentfiledata in update_file_p1
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 17 Nov 2021 20:26:33 +0100] rev 48386
dirstate: stop gathering parentfiledata in update_file_p1 Gathering information here assume that they are valid cache information for a clean file. It is true most of the time, but not garanteed. So we drop this and will let the next `hg status` call record actual information. Differential Revision: https://phab.mercurial-scm.org/D11790
Wed, 17 Nov 2021 20:26:14 +0100 dirstate: make it mandatory to provide parentfiledata in `set_clean`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 17 Nov 2021 20:26:14 +0100] rev 48385
dirstate: make it mandatory to provide parentfiledata in `set_clean` Gathering the mode, size and mtime, independently from determining that the file is clean is a race-machine. So we just make these information required arguments. (note that the data is still gathered in a racy way in practice, but at least the API is no longer encouraging it.) Differential Revision: https://phab.mercurial-scm.org/D11789
Mon, 22 Nov 2021 15:58:51 +0100 dirstate: do no use `set_clean` in revert
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 22 Nov 2021 15:58:51 +0100] rev 48384
dirstate: do no use `set_clean` in revert The current `set_clean` usage is racy (the file might be modified between its restoration and the `set_clean` call). So we simply leave the file as ambiguous and the next status will fix that. We still have to make sure the copy information is dropped, so we teach dirstate how to do that. The win32txt extension is confused after this because current logic is broken in more location. However this series will ultimately fix that so we "ignore" it for now. Fixing it now is complicated without some extra fix landing later. Differential Revision: https://phab.mercurial-scm.org/D11788
Thu, 18 Nov 2021 22:49:05 +0100 status: adapt the "keyword" extensions to gather stats at lookup time
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 18 Nov 2021 22:49:05 +0100] rev 48383
status: adapt the "keyword" extensions to gather stats at lookup time See main core code for details. We don't factor the code in a common function yet, because we will have to adapt a bit more things in the keyword case at the end of the series. Differential Revision: https://phab.mercurial-scm.org/D11787
Thu, 18 Nov 2021 22:46:50 +0100 status: adapt largefile to gather stats at lookup time
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 18 Nov 2021 22:46:50 +0100] rev 48382
status: adapt largefile to gather stats at lookup time See the core code for details of why we are doing this. We don't factor the code in a common function yet, because we will have to adapt a bit more things in the largefile case at the end of the series. Differential Revision: https://phab.mercurial-scm.org/D11786
Wed, 17 Nov 2021 23:37:47 +0100 status: gather fixup info at comparison time
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 17 Nov 2021 23:37:47 +0100] rev 48381
status: gather fixup info at comparison time This is still racy, but on a much small windows. In addition, the API now make it possible for it to not be racy. This also unlock other cleanups that we are about to do regarding mtime ambiguity at gathering time. Differential Revision: https://phab.mercurial-scm.org/D11785
Wed, 17 Nov 2021 10:22:15 +0100 update: filter the ambiguous mtime in update directly
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 17 Nov 2021 10:22:15 +0100] rev 48380
update: filter the ambiguous mtime in update directly Right now, this filtering is done by `dirstate.write` using the time of `dirstate.write` method call. However that filtering is done "too late" It works "fine" as most command are "fast enough", and race rare enough. We are about to change the mtime filtering logic in the dirstate to be more accurate and reliable. However `hg update` will still need such filtering (mostly because it is actually quite racy, even with the existing filtering). So we explicitly implement a similar logic here. Before removing the older one later in the series. Differential Revision: https://phab.mercurial-scm.org/D11784
Wed, 17 Nov 2021 12:24:00 +0100 dirstate: move "get fs now" in the timestamp utility module
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 17 Nov 2021 12:24:00 +0100] rev 48379
dirstate: move "get fs now" in the timestamp utility module We will need it during update. Differential Revision: https://phab.mercurial-scm.org/D11783
Wed, 17 Nov 2021 10:26:48 +0100 dirstate-item: allow mtime to be None in "parentdata"
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 17 Nov 2021 10:26:48 +0100] rev 48378
dirstate-item: allow mtime to be None in "parentdata" This will be useful to filter out unreliable mtime. Differential Revision: https://phab.mercurial-scm.org/D11782
Wed, 17 Nov 2021 02:58:44 +0100 dirstate: add a comment about a racy piece of code during updates
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 17 Nov 2021 02:58:44 +0100] rev 48377
dirstate: add a comment about a racy piece of code during updates This is a bit that is not really correct but works "fine" in practice. Let us write the details down so that people stop wondering how that logic might be correct… It is not. Differential Revision: https://phab.mercurial-scm.org/D11781
Mon, 25 Oct 2021 15:11:53 +0200 tests: add missing `head` for when things go wrong
Raphaël Gomès <rgomes@octobus.net> [Mon, 25 Oct 2021 15:11:53 +0200] rev 48376
tests: add missing `head` for when things go wrong See comment above the changed line, you can get a millions of line of output in case of failure. When don't need to have them all. Differential Revision: https://phab.mercurial-scm.org/D11780
Tue, 23 Nov 2021 16:32:56 +0100 tests: ensure a status will have non ambiguous mtime in some race test
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 23 Nov 2021 16:32:56 +0100] rev 48375
tests: ensure a status will have non ambiguous mtime in some race test For the test to work, we need some mtime to be recorded. For them to be recorded, they need to be "clearly in the past", otherwise edit with the same mtime would be possible. Strictly speaking there might be file system with a minimal mtime increment longer than one second. However it is unlikely that we will run the test on them for now. We can be smarter about this in the future if it becomes necessary. Differential Revision: https://phab.mercurial-scm.org/D11779
Thu, 18 Nov 2021 00:08:57 +0100 tests: make sure no ambiguities remains after the commit
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 18 Nov 2021 00:08:57 +0100] rev 48374
tests: make sure no ambiguities remains after the commit This will help to stabilize part of the test that are not relevant for what is actually tested. Differential Revision: https://phab.mercurial-scm.org/D11778
Thu, 04 Nov 2021 17:49:25 +0100 dirstate: clarify a `hg update` invocation in a test
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 04 Nov 2021 17:49:25 +0100] rev 48373
dirstate: clarify a `hg update` invocation in a test It is common for readers of that test to confuse the `hg co` call with a `hg commit`, while it actually means `hg checkout`, an alias for the more common `hg update. So let us use the clearer version. Differential Revision: https://phab.mercurial-scm.org/D11777
Wed, 01 Dec 2021 00:04:29 +0100 test: mark rhg output as flaky
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 01 Dec 2021 00:04:29 +0100] rev 48372
test: mark rhg output as flaky rhg is not updating the dirstate on status yet, which make this part of the test flaky. This will be fixed soon. Differential Revision: https://phab.mercurial-scm.org/D11833
Mon, 18 Oct 2021 12:30:53 -0700 chistedit: explain which order the commits are presented in
Martin von Zweigbergk <martinvonz@google.com> [Mon, 18 Oct 2021 12:30:53 -0700] rev 48371
chistedit: explain which order the commits are presented in It's not obvious which order the commits in chistedit (and text-based histedit), so let's add a note about it. Differential Revision: https://phab.mercurial-scm.org/D11832
Mon, 22 Nov 2021 17:21:55 -0800 errors: use detailed error for invalid commit-extras argument
Martin von Zweigbergk <martinvonz@google.com> [Mon, 22 Nov 2021 17:21:55 -0800] rev 48370
errors: use detailed error for invalid commit-extras argument Differential Revision: https://phab.mercurial-scm.org/D11831
Fri, 19 Nov 2021 16:21:00 -0800 errors: use detailed exit code in pathauditor
Martin von Zweigbergk <martinvonz@google.com> [Fri, 19 Nov 2021 16:21:00 -0800] rev 48369
errors: use detailed exit code in pathauditor Differential Revision: https://phab.mercurial-scm.org/D11830
Fri, 19 Nov 2021 16:16:21 -0800 errors: use detailed exit code for RepoLookupError
Martin von Zweigbergk <martinvonz@google.com> [Fri, 19 Nov 2021 16:16:21 -0800] rev 48368
errors: use detailed exit code for RepoLookupError Differential Revision: https://phab.mercurial-scm.org/D11829
Fri, 19 Nov 2021 15:40:56 -0800 errors: use detailed exit code for detected case-collision
Martin von Zweigbergk <martinvonz@google.com> [Fri, 19 Nov 2021 15:40:56 -0800] rev 48367
errors: use detailed exit code for detected case-collision Differential Revision: https://phab.mercurial-scm.org/D11828
Fri, 19 Nov 2021 15:39:35 -0800 errors: use detailed exit code when trying to merge file outside narrowspec
Martin von Zweigbergk <martinvonz@google.com> [Fri, 19 Nov 2021 15:39:35 -0800] rev 48366
errors: use detailed exit code when trying to merge file outside narrowspec Differential Revision: https://phab.mercurial-scm.org/D11827
Fri, 19 Nov 2021 15:38:36 -0800 errors: use detailed exit code for non-integer number of diff context lines
Martin von Zweigbergk <martinvonz@google.com> [Fri, 19 Nov 2021 15:38:36 -0800] rev 48365
errors: use detailed exit code for non-integer number of diff context lines Differential Revision: https://phab.mercurial-scm.org/D11826
Fri, 19 Nov 2021 09:17:30 -0800 patch: add hint about mangled whitespace on bad patch
Martin von Zweigbergk <martinvonz@google.com> [Fri, 19 Nov 2021 09:17:30 -0800] rev 48364
patch: add hint about mangled whitespace on bad patch One of the most common reasons that a patch doesn't apply is because its whitespace has been mangled (e.g. by their mail client or though copy&paste). Let's provide a hint about that. Differential Revision: https://phab.mercurial-scm.org/D11825
Fri, 19 Nov 2021 12:57:53 -0800 errors: return more detailed errors when failing to parse or apply patch
Martin von Zweigbergk <martinvonz@google.com> [Fri, 19 Nov 2021 12:57:53 -0800] rev 48363
errors: return more detailed errors when failing to parse or apply patch This patch adds subclasses of `PatchError` so we can distinguish between failure to parse a patch from failure to apply it. It updates the callers to raise either `InputError` or `StateError` depending on which type of error occurred. Differential Revision: https://phab.mercurial-scm.org/D11824
Fri, 26 Nov 2021 17:22:14 +0100 extensions: add a default "*" suboptions prefix
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 26 Nov 2021 17:22:14 +0100] rev 48362
extensions: add a default "*" suboptions prefix This is similar to what we do in other section (e.g. `paths`) and allow to change the behavior for all extensions. Sub options on individual extensions overwrite the default settings. Differential Revision: https://phab.mercurial-scm.org/D11823
Fri, 26 Nov 2021 17:17:49 +0100 extension: add a `required` suboption to enforce the use of an extensions
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 26 Nov 2021 17:17:49 +0100] rev 48361
extension: add a `required` suboption to enforce the use of an extensions If `required` is set, failing to load an extensions will abort. See the test and documentation for details. Differential Revision: https://phab.mercurial-scm.org/D11822
Mon, 29 Nov 2021 13:09:04 +0100 extensions: highlight the name of the faulty extensions in the error message
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 29 Nov 2021 13:09:04 +0100] rev 48360
extensions: highlight the name of the faulty extensions in the error message This make it easier to understand the message when the extensions name is common. Differential Revision: https://phab.mercurial-scm.org/D11821
Fri, 26 Nov 2021 16:55:34 +0100 extensions: refactor handling of loading error make it reusable
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 26 Nov 2021 16:55:34 +0100] rev 48359
extensions: refactor handling of loading error make it reusable We will need this in the next patch. Differential Revision: https://phab.mercurial-scm.org/D11820
Fri, 26 Nov 2021 16:51:58 +0100 extensions: ignore "sub-options" when looking for extensions
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 26 Nov 2021 16:51:58 +0100] rev 48358
extensions: ignore "sub-options" when looking for extensions config suboptions are separated by ":" (see the path one for example). So we dont want to confuse these config with actual extensions. We don't have extensions sub option yet, but I am about to introduce one for making sure an extensions can load. So lets level the floor first. Differential Revision: https://phab.mercurial-scm.org/D11819
Tue, 23 Nov 2021 17:52:38 -0800 automation: support Python 3.10 on Windows
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 23 Nov 2021 17:52:38 -0800] rev 48357
automation: support Python 3.10 on Windows Python 3.10 is out and we should support it. This commit teaches the automation code to install and support building for Python 3.10. Differential Revision: https://phab.mercurial-scm.org/D11776
Mon, 15 Nov 2021 20:10:50 -0800 contrib: update Windows environment to Python 3.9.9
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 15 Nov 2021 20:10:50 -0800] rev 48356
contrib: update Windows environment to Python 3.9.9 Let's keep the environment modern. Differential Revision: https://phab.mercurial-scm.org/D11775
Mon, 29 Nov 2021 14:07:47 +0000 rhg: implement the debugignorerhg subcommand
Arseniy Alekseyev <aalekseyev@janestreet.com> [Mon, 29 Nov 2021 14:07:47 +0000] rev 48355
rhg: implement the debugignorerhg subcommand This can be used to inspect the generated pattern, but also to benchmark the time it takes to parse hgignore. Differential Revision: https://phab.mercurial-scm.org/D11722
Mon, 29 Nov 2021 14:06:41 +0000 rhg: refactor to use IgnoreFnType alias more widely
Arseniy Alekseyev <aalekseyev@janestreet.com> [Mon, 29 Nov 2021 14:06:41 +0000] rev 48354
rhg: refactor to use IgnoreFnType alias more widely Differential Revision: https://phab.mercurial-scm.org/D11818
Thu, 11 Nov 2021 14:26:25 +0000 rhg: only complain about poorly configured fallback when falling back
Arseniy Alekseyev <aalekseyev@janestreet.com> [Thu, 11 Nov 2021 14:26:25 +0000] rev 48353
rhg: only complain about poorly configured fallback when falling back Differential Revision: https://phab.mercurial-scm.org/D11751
Wed, 24 Nov 2021 20:51:01 -0500 packaging: bump pygit2 to 1.7.1
Matt Harbison <matt_harbison@yahoo.com> [Wed, 24 Nov 2021 20:51:01 -0500] rev 48352
packaging: bump pygit2 to 1.7.1 Differential Revision: https://phab.mercurial-scm.org/D11805
Wed, 24 Nov 2021 20:45:27 -0500 packaging: bump windows_curses to 2.3.0
Matt Harbison <matt_harbison@yahoo.com> [Wed, 24 Nov 2021 20:45:27 -0500] rev 48351
packaging: bump windows_curses to 2.3.0 This is required for Python 3.10 support. Differential Revision: https://phab.mercurial-scm.org/D11804
Wed, 24 Nov 2021 20:43:05 -0500 packaging: regenerate the requirements files with pip-tools 6.4.0
Matt Harbison <matt_harbison@yahoo.com> [Wed, 24 Nov 2021 20:43:05 -0500] rev 48350
packaging: regenerate the requirements files with pip-tools 6.4.0 Somewhere along the line, the formatting changed. There's no change in package content here- it's just some minor text changes. Py2 doesn't have any packages we'll be updating, so I'm not bothering there. Differential Revision: https://phab.mercurial-scm.org/D11803
Fri, 26 Nov 2021 15:59:09 +0100 rhg: Add support for `rhg status -n`
Simon Sapin <simon.sapin@octobus.net> [Fri, 26 Nov 2021 15:59:09 +0100] rev 48349
rhg: Add support for `rhg status -n` The `RHG_STATUS=1` bit added here can be removed when `unset RHG_STATUS` near the top of the file is removed. Differential Revision: https://phab.mercurial-scm.org/D11815
Fri, 19 Nov 2021 18:48:34 -0800 filemerge: simplify slightly by using filectx.decodeddata()
Martin von Zweigbergk <martinvonz@google.com> [Fri, 19 Nov 2021 18:48:34 -0800] rev 48348
filemerge: simplify slightly by using filectx.decodeddata() Differential Revision: https://phab.mercurial-scm.org/D11802
Fri, 19 Nov 2021 18:14:25 -0800 filemerge: rename _formatconflictmarker() since it formats a label
Martin von Zweigbergk <martinvonz@google.com> [Fri, 19 Nov 2021 18:14:25 -0800] rev 48347
filemerge: rename _formatconflictmarker() since it formats a label `_formatconflictmarker()`'s name made me think that it would create something like `<<<<<<<` and maybe some more stuff after it, but it's actually just the label that comes after on the same line. So let's rename it to `_formatlabel()`. That's better aligned with the variables the result is assigned it. Differential Revision: https://phab.mercurial-scm.org/D11801
Sun, 28 Nov 2021 11:27:08 +0100 tests: fix test-fix on NetBSD stable
Thomas Klausner <wiz@gatalith.at> [Sun, 28 Nov 2021 11:27:08 +0100] rev 48346
tests: fix test-fix on NetBSD Differential Revision: https://phab.mercurial-scm.org/D11816
Tue, 23 Nov 2021 20:04:22 +0100 rhg: Fix status desambiguation of symlinks and executable files
Simon Sapin <simon.sapin@octobus.net> [Tue, 23 Nov 2021 20:04:22 +0100] rev 48345
rhg: Fix status desambiguation of symlinks and executable files Differential Revision: https://phab.mercurial-scm.org/D11774
Tue, 23 Nov 2021 19:40:29 +0100 rhg: Rename cat_file_is_modified
Simon Sapin <simon.sapin@octobus.net> [Tue, 23 Nov 2021 19:40:29 +0100] rev 48344
rhg: Rename cat_file_is_modified It hasn’t been based on the "cat operation" for some time already. Differential Revision: https://phab.mercurial-scm.org/D11773
Tue, 23 Nov 2021 19:39:51 +0100 rhg: Also parse flags in the manifest parser
Simon Sapin <simon.sapin@octobus.net> [Tue, 23 Nov 2021 19:39:51 +0100] rev 48343
rhg: Also parse flags in the manifest parser Differential Revision: https://phab.mercurial-scm.org/D11772
Tue, 23 Nov 2021 18:27:42 +0100 rhg: Propogate manifest parse errors instead of panicking
Simon Sapin <simon.sapin@octobus.net> [Tue, 23 Nov 2021 18:27:42 +0100] rev 48342
rhg: Propogate manifest parse errors instead of panicking The Rust parser for the manifest file format is an iterator. Now every item from that iterator is a `Result`, which makes error handling required in multiple new places. This makes better recovery on errors possible, compare to a run time panic. Differential Revision: https://phab.mercurial-scm.org/D11771
Fri, 19 Nov 2021 17:34:48 +0100 tests: Adapt test-basic.t expected output for rhg
Simon Sapin <simon.sapin@octobus.net> [Fri, 19 Nov 2021 17:34:48 +0100] rev 48341
tests: Adapt test-basic.t expected output for rhg Differential Revision: https://phab.mercurial-scm.org/D11769
Tue, 09 Nov 2021 19:28:13 +0100 rhg: Colored output is not supported
Simon Sapin <simon.sapin@octobus.net> [Tue, 09 Nov 2021 19:28:13 +0100] rev 48340
rhg: Colored output is not supported Fallback if it is requested explicitly. The default is documented as use color "whenever it seems possible". rhg proceeds without color in that case. Differential Revision: https://phab.mercurial-scm.org/D11762
Tue, 09 Nov 2021 19:09:57 +0100 rhg: [encode] and [decode] config sections are not supported
Simon Sapin <simon.sapin@octobus.net> [Tue, 09 Nov 2021 19:09:57 +0100] rev 48339
rhg: [encode] and [decode] config sections are not supported Differential Revision: https://phab.mercurial-scm.org/D11761
Tue, 09 Nov 2021 18:56:55 +0100 rhg: Config commands.status.terse is not supported
Simon Sapin <simon.sapin@octobus.net> [Tue, 09 Nov 2021 18:56:55 +0100] rev 48338
rhg: Config commands.status.terse is not supported Differential Revision: https://phab.mercurial-scm.org/D11760
Tue, 09 Nov 2021 18:39:37 +0100 rhg: Propagate config errors in `rhg status`
Simon Sapin <simon.sapin@octobus.net> [Tue, 09 Nov 2021 18:39:37 +0100] rev 48337
rhg: Propagate config errors in `rhg status` This code was calling `Result::unwrap_or` instead of `Option::unwrap_or` as was presumably intended. Differential Revision: https://phab.mercurial-scm.org/D11759
Tue, 09 Nov 2021 17:09:40 +0100 rhg: $HG_PENDING is not supported
Simon Sapin <simon.sapin@octobus.net> [Tue, 09 Nov 2021 17:09:40 +0100] rev 48336
rhg: $HG_PENDING is not supported Trigger fallback in that case, if configured to do so. Differential Revision: https://phab.mercurial-scm.org/D11758
Tue, 09 Nov 2021 19:55:46 +0100 rhg: Enable `rhg status` in most tests
Simon Sapin <simon.sapin@octobus.net> [Tue, 09 Nov 2021 19:55:46 +0100] rev 48335
rhg: Enable `rhg status` in most tests This subcommand is disabled by default because of bugs that make some test fail. Enable it in the rest of the tests in order to avoid regressing them. As with `RHG_ON_UNSUPPORTED`, an environment variable is used instead of a configuration file and `HGRCPATH` because some tests override `HGRCPATH`. Running `unset RHG_STATUS` at the start of a test restores the default of `rhg status` being disabled. Hopefully it can be increasingly removed from test files as bugs are fixed. Differential Revision: https://phab.mercurial-scm.org/D11756
Tue, 23 Nov 2021 15:35:31 +0530 Added signature for changeset 5d08b289e2e5 stable
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 23 Nov 2021 15:35:31 +0530] rev 48334
Added signature for changeset 5d08b289e2e5
Tue, 23 Nov 2021 15:35:21 +0530 Added tag 6.0 for changeset 5d08b289e2e5 stable
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 23 Nov 2021 15:35:21 +0530] rev 48333
Added tag 6.0 for changeset 5d08b289e2e5
Wed, 17 Nov 2021 13:47:25 +0100 packaging: make rpm relocatable stable 6.0
Mathias De Mare <mathias.de_mare@nokia.com> [Wed, 17 Nov 2021 13:47:25 +0100] rev 48332
packaging: make rpm relocatable This makes it possible to install multiple Mercurial rpms on the same machine in different locations. Differential Revision: https://phab.mercurial-scm.org/D11768
Wed, 17 Nov 2021 13:28:22 +0100 dockerrpm: always use current user and group stable
Mathias De Mare <mathias.de_mare@nokia.com> [Wed, 17 Nov 2021 13:28:22 +0100] rev 48331
dockerrpm: always use current user and group Using uid 1000 and gid 1000 works by default in some cases, but 'id -u' and 'id -g' should work in all cases. Differential Revision: https://phab.mercurial-scm.org/D11767
Thu, 18 Nov 2021 12:31:37 +0100 cext: fix Python 3.11 compatibility - Py_SIZE is not an lvalue (issue6610) stable
Mads Kiilerich <mads@kiilerich.com> [Thu, 18 Nov 2021 12:31:37 +0100] rev 48330
cext: fix Python 3.11 compatibility - Py_SIZE is not an lvalue (issue6610) Py_SIZE was made a static inline function during Python 3.10 development, as described on https://vstinner.github.io/c-api-opaque-structures.html . e92ca942ddca updated the Mercurial code base accordingly, but somehow missed a couple of cases introduced long time ago in a8c948ee3668. The Python change was dropped for 3.10, but is coming back again in 3.11 .
Fri, 19 Nov 2021 11:20:10 +0100 branching: merge stable into default
Raphaël Gomès <rgomes@octobus.net> [Fri, 19 Nov 2021 11:20:10 +0100] rev 48329
branching: merge stable into default
Tue, 16 Nov 2021 16:38:37 +0100 heptapod-ci: re-introduce Windows CI stable
Raphaël Gomès <rgomes@octobus.net> [Tue, 16 Nov 2021 16:38:37 +0100] rev 48328
heptapod-ci: re-introduce Windows CI We have Windows runners for now, and we're trying to find more, so let's share the joy of flaky tests with everyone. Differential Revision: https://phab.mercurial-scm.org/D11765
Mon, 15 Nov 2021 19:53:01 -0800 cext: define S_IFLNK on Python 2.7 and Windows stable
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 15 Nov 2021 19:53:01 -0800] rev 48327
cext: define S_IFLNK on Python 2.7 and Windows Before this change, building on Python 2.7 on Windows fails due to S_IFLNK being undefined. This regression was introduced by a32a96079e2d / D11518. It worked on Python 3 because its pyport.h (which is included via Python.h) contains effectively the same code as added by this changeset. Differential Revision: https://phab.mercurial-scm.org/D11763
Mon, 15 Nov 2021 12:03:28 +0100 tests: dd status=noxfer is not portable (issue6523) stable
Thomas Klausner <wiz@gatalith.at> [Mon, 15 Nov 2021 12:03:28 +0100] rev 48326
tests: dd status=noxfer is not portable (issue6523) Differential Revision: https://phab.mercurial-scm.org/D11754
Mon, 15 Nov 2021 00:15:21 +0100 tests: use more portable mkdir -p instead of --parents (issue6591) stable
Thomas Klausner <wiz@gatalith.at> [Mon, 15 Nov 2021 00:15:21 +0100] rev 48325
tests: use more portable mkdir -p instead of --parents (issue6591) Differential Revision: https://phab.mercurial-scm.org/D11755
Mon, 15 Nov 2021 00:08:02 +0100 tests: fix test-censor by improving regexp (issue6585) stable
Thomas Klausner <wiz@gatalith.at> [Mon, 15 Nov 2021 00:08:02 +0100] rev 48324
tests: fix test-censor by improving regexp (issue6585) Differential Revision: https://phab.mercurial-scm.org/D11753
Wed, 10 Nov 2021 08:09:34 -0800 ci: stop running with Python 2
Martin von Zweigbergk <martinvonz@google.com> [Wed, 10 Nov 2021 08:09:34 -0800] rev 48323
ci: stop running with Python 2 We're dropping support for Python 2 after hg 6.0. Differential Revision: https://phab.mercurial-scm.org/D11748
Wed, 10 Nov 2021 11:43:22 +0100 internals: typo pass on the dirstate-v2 help file stable
Raphaël Gomès <rgomes@octobus.net> [Wed, 10 Nov 2021 11:43:22 +0100] rev 48322
internals: typo pass on the dirstate-v2 help file Differential Revision: https://phab.mercurial-scm.org/D11747
Wed, 10 Nov 2021 11:42:13 +0100 dirstate-v2: fix confusion between requirement and format config variable stable
Raphaël Gomès <rgomes@octobus.net> [Wed, 10 Nov 2021 11:42:13 +0100] rev 48321
dirstate-v2: fix confusion between requirement and format config variable None of those outputs failed on the CI because dirstate-v2 is not fully tested yet. This also updates the documentation. Differential Revision: https://phab.mercurial-scm.org/D11746
Wed, 10 Nov 2021 10:58:13 +0100 internals: correct dirstate-v2 format variable in the documentation stable
Raphaël Gomès <rgomes@octobus.net> [Wed, 10 Nov 2021 10:58:13 +0100] rev 48320
internals: correct dirstate-v2 format variable in the documentation Differential Revision: https://phab.mercurial-scm.org/D11745
Wed, 10 Nov 2021 10:50:54 +0100 hghave: update dirstate-v2 format config option stable
Raphaël Gomès <rgomes@octobus.net> [Wed, 10 Nov 2021 10:50:54 +0100] rev 48319
hghave: update dirstate-v2 format config option It wasn't kept in sync with the new change in format name. Differential Revision: https://phab.mercurial-scm.org/D11744
Wed, 10 Nov 2021 14:54:55 -0500 merge: with stable
Augie Fackler <augie@google.com> [Wed, 10 Nov 2021 14:54:55 -0500] rev 48318
merge: with stable
Tue, 09 Nov 2021 22:06:40 +0530 Added signature for changeset a44bb185f6bd stable
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 09 Nov 2021 22:06:40 +0530] rev 48317
Added signature for changeset a44bb185f6bd
Tue, 09 Nov 2021 22:06:26 +0530 Added tag 6.0rc0 for changeset a44bb185f6bd stable
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 09 Nov 2021 22:06:26 +0530] rev 48316
Added tag 6.0rc0 for changeset a44bb185f6bd
Tue, 09 Nov 2021 21:56:04 +0530 merge with default stable 6.0rc0
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 09 Nov 2021 21:56:04 +0530] rev 48315
merge with default
Tue, 09 Nov 2021 02:19:43 +0100 tests: accept alternative privileged port allocation failure stable
pacien <pacien.trangirard@pacien.net> [Tue, 09 Nov 2021 02:19:43 +0100] rev 48314
tests: accept alternative privileged port allocation failure This registers an additional failure message on failed privileged port allocation, equally funcionally valid but previously not handled and causing the test to fail when run in the NixOS sandbox. Differential Revision: https://phab.mercurial-scm.org/D11741
Tue, 09 Nov 2021 02:16:43 +0100 tests: allow the true command to be provided by coreutils stable
pacien <pacien.trangirard@pacien.net> [Tue, 09 Nov 2021 02:16:43 +0100] rev 48313
tests: allow the true command to be provided by coreutils The `true` command is sometimes provided as a symbolic link to the `coreutils` single binary. This is the case on NixOS, on which the test was failing because the symbolic link fully resolves to the latter name, equally valid but not previously accepted by the test's golden output. Differential Revision: https://phab.mercurial-scm.org/D11740
Tue, 09 Nov 2021 02:08:18 +0100 tests: add guard check for suid support stable
pacien <pacien.trangirard@pacien.net> [Tue, 09 Nov 2021 02:08:18 +0100] rev 48312
tests: add guard check for suid support This adds a check for setuid and setgid support and guards a part of a test requiring this particular filesystem feature. Such feature is notably missing in the Nix/NixOS build sandbox and was causing the whole test to fail for the mercurial package. Differential Revision: https://phab.mercurial-scm.org/D11739
Tue, 26 Oct 2021 19:47:30 +0100 rhg: more efficient `HgPath::join`
Arseniy Alekseyev <aalekseyev@janestreet.com> [Tue, 26 Oct 2021 19:47:30 +0100] rev 48311
rhg: more efficient `HgPath::join` This commit makes `HgPath::join` slightly more efficient by avoiding one copy. It also avoids a particularly inefficient (quadratic) use of `HgPath::join` by using a new mutating function `HgPathBuf::push` instead. The name for `HgPathBuf::push` is chosen by analogy to `PathBuf::push`. Differential Revision: https://phab.mercurial-scm.org/D11721
Tue, 09 Nov 2021 15:25:38 +0100 relnotes: update 6.0 with the last changes for the release
Raphaël Gomès <rgomes@octobus.net> [Tue, 09 Nov 2021 15:25:38 +0100] rev 48310
relnotes: update 6.0 with the last changes for the release Differential Revision: https://phab.mercurial-scm.org/D11742
Tue, 09 Nov 2021 15:43:29 +0100 rhg: Fix `rhg status` file content comparison
Simon Sapin <simon.sapin@octobus.net> [Tue, 09 Nov 2021 15:43:29 +0100] rev 48309
rhg: Fix `rhg status` file content comparison This is only used when a file’s metadata make its status ambiguous, which depends on timing of previous command executions. Differential Revision: https://phab.mercurial-scm.org/D11743
Wed, 27 Oct 2021 19:37:46 +0100 rhg: make it possible to opt out of `rhg cat`
Arseniy Alekseyev <aalekseyev@janestreet.com> [Wed, 27 Oct 2021 19:37:46 +0100] rev 48308
rhg: make it possible to opt out of `rhg cat` The reason an opt-out is needed is that there are still behavior differences between `rhg cat` and `hg cat`: - it does not interpret relative paths correctly - it does not interpret patterns correctly, e.g. 're:foobar$' would be interpreted as a verbatim filename - it does not implement the correct semantics of relpath matcher: if given a directory, `hg` concatenates all files in this directory, while `rhg` simply complains Differential Revision: https://phab.mercurial-scm.org/D11723
Tue, 09 Nov 2021 02:00:25 +0100 tests: run the whole hg-core/path_auditor test in a clean temp dir stable
pacien <pacien.trangirard@pacien.net> [Tue, 09 Nov 2021 02:00:25 +0100] rev 48307
tests: run the whole hg-core/path_auditor test in a clean temp dir This makes the whole test happen in a clean temporary directory in `$TMPDIR/$random`, and simplifies the test a bit by eliminating unnecessarily dynamic path elements computations. Before this patch, the first part of the test was happening in `/tmp` itself. This allowed coincidentally named files placed in that directory to impact the outcome of the test. Additionally, this made the second part of the test fail on systems on which `$TMPDIR != /tmp`, because the inspected directory was different from the one in which the mock files were being written. This fully fixes the issue only partially solved in db2bc9e667a1. Differential Revision: https://phab.mercurial-scm.org/D11738
Wed, 20 Oct 2021 10:25:51 +0200 fsmonitor: fix traceback after removal of nonnormalset (issue6600)
Raphaël Gomès <rgomes@octobus.net> [Wed, 20 Oct 2021 10:25:51 +0200] rev 48306
fsmonitor: fix traceback after removal of nonnormalset (issue6600) This basically does the same thing it used to do, but in the only place it's needed. Differential Revision: https://phab.mercurial-scm.org/D11707
Wed, 20 Oct 2021 10:26:39 +0200 fsmonitor: fix traceback about bytes and str incompatibility
Raphaël Gomès <rgomes@octobus.net> [Wed, 20 Oct 2021 10:26:39 +0200] rev 48305
fsmonitor: fix traceback about bytes and str incompatibility This didn't work anymore in Python 3, switching to a `repr` based reporting does Differential Revision: https://phab.mercurial-scm.org/D11708
Wed, 27 Oct 2021 15:18:52 +0200 backout: backed out changeset 67d14d4e036c
Raphaël Gomès <rgomes@octobus.net> [Wed, 27 Oct 2021 15:18:52 +0200] rev 48304
backout: backed out changeset 67d14d4e036c Same as the previous patch, this breaks the Windows CI for some yet unknown reason. Differential Revision: https://phab.mercurial-scm.org/D11727
Wed, 27 Oct 2021 12:07:58 +0200 backout: backed out changeset f78d8b8c46d7
Raphaël Gomès <rgomes@octobus.net> [Wed, 27 Oct 2021 12:07:58 +0200] rev 48303
backout: backed out changeset f78d8b8c46d7 This and the following backout exist because the original patches break the Windows CI for some yet unknown reason. Differential Revision: https://phab.mercurial-scm.org/D11726
Thu, 04 Nov 2021 12:35:05 +0100 relnotes: clear next release notes
Raphaël Gomès <rgomes@octobus.net> [Thu, 04 Nov 2021 12:35:05 +0100] rev 48302
relnotes: clear next release notes Differential Revision: https://phab.mercurial-scm.org/D11737
Thu, 04 Nov 2021 12:34:51 +0100 relnotes: add 6.0 release notes
Raphaël Gomès <rgomes@octobus.net> [Thu, 04 Nov 2021 12:34:51 +0100] rev 48301
relnotes: add 6.0 release notes Differential Revision: https://phab.mercurial-scm.org/D11736
Thu, 04 Nov 2021 09:55:37 +0100 relnotes: fix wrong command name in 5.9 relnotes stable
Raphaël Gomès <rgomes@octobus.net> [Thu, 04 Nov 2021 09:55:37 +0100] rev 48300
relnotes: fix wrong command name in 5.9 relnotes Differential Revision: https://phab.mercurial-scm.org/D11735
Wed, 03 Nov 2021 14:11:11 -0700 pyoxidizer: use in-memory resources on non-Windows platforms
Kyle Lippincott <spectral@google.com> [Wed, 03 Nov 2021 14:11:11 -0700] rev 48299
pyoxidizer: use in-memory resources on non-Windows platforms In-memory resources were disabled for macOS in 7bc1beed, and for all platforms in c900d962. Unfortunately this made it so that we were no longer producing standalone binaries on these platforms, and would have to ship the .py and .pyc files alongside the pyoxidized binary. These changes are no longer necessary after f6b04591, which disabled pep517 and solved the issue we were encountering. Differential Revision: https://phab.mercurial-scm.org/D11734
Wed, 03 Nov 2021 12:35:57 +0100 compat: don't rely on cpython-specific builtins manipulation
Raphaël Gomès <rgomes@octobus.net> [Wed, 03 Nov 2021 12:35:57 +0100] rev 48298
compat: don't rely on cpython-specific builtins manipulation Pierre Augier signaled on the mailing list that this fails on Pypy and pointed out the correct solution. Differential Revision: https://phab.mercurial-scm.org/D11732
Wed, 03 Nov 2021 17:06:01 +0100 rust-format: update rustfmt version
Raphaël Gomès <rgomes@octobus.net> [Wed, 03 Nov 2021 17:06:01 +0100] rev 48297
rust-format: update rustfmt version This hasn't been updated in a while, and since we're updating the MSRV to 1.48.0, we might as well do this. Differential Revision: https://phab.mercurial-scm.org/D11733
Wed, 25 Aug 2021 17:53:19 +0200 rust: update the minimum version of Rust
Raphaël Gomès <rgomes@octobus.net> [Wed, 25 Aug 2021 17:53:19 +0200] rev 48296
rust: update the minimum version of Rust Debian Bullseye has just been released, and it carries `rustc 1.48.0`. This actually implies a regression that we can't really do anything about in `rhg`. See https://github.com/rust-lang/rust/issues/88825. In short, closed (or bad) standard file descriptors are reopened silently with no way of telling by the Rust runtime before `main` is executed. This means that closed fds are not forwarded to the subprocess we run in case of fallback. This is a bit sad, but probably not something worth worrying too much about. Differential Revision: https://phab.mercurial-scm.org/D11341
Wed, 20 Oct 2021 00:57:02 +0200 dirstate-v2: freeze the on-disk format
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 20 Oct 2021 00:57:02 +0200] rev 48295
dirstate-v2: freeze the on-disk format It seems the format as reached a good balance. With a core of new capabilities that motivated it initially and enough new feature and room for future improvement to be a clear progress we can set a milestone for. Having the format frozen will help the feature to get real life testing, outside of the test suite. The feature itself stay experimental but the config gains a new name to avoid people enable non-frozen version by default. If too many bugs are reported during the RC we might move the format back to experimental and drop its support in future version (in favor of a new one) Differential Revision: https://phab.mercurial-scm.org/D11709
Mon, 01 Nov 2021 14:59:07 -0400 merge: with stable
Augie Fackler <augie@google.com> [Mon, 01 Nov 2021 14:59:07 -0400] rev 48294
merge: with stable
Fri, 22 Oct 2021 09:45:35 +0200 windows: use raw string in test log paths
Raphaël Gomès <rgomes@octobus.net> [Fri, 22 Oct 2021 09:45:35 +0200] rev 48293
windows: use raw string in test log paths Otherwise the backslashes will work as escapes on Windows and break everything. Differential Revision: https://phab.mercurial-scm.org/D11725
Fri, 29 Oct 2021 14:40:46 +0200 pull: make the new argument a keyword argument
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 29 Oct 2021 14:40:46 +0200] rev 48292
pull: make the new argument a keyword argument As per feedback from Dan Villiom Podlaski Christiansen in https://phab.mercurial-scm.org/D11674#179866 Differential Revision: https://phab.mercurial-scm.org/D11730
Thu, 28 Oct 2021 17:44:58 +0200 dirstate: make sure that status does not overlook the fallback flags
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 28 Oct 2021 17:44:58 +0200] rev 48291
dirstate: make sure that status does not overlook the fallback flags Without this extra checks, file with fallback flags change as the only change would be overlooked. In the future we might store proper data in the dirstate and do less lookup. However, for now this will do to make sure that 6.0 is forward compatible with later version. Differential Revision: https://phab.mercurial-scm.org/D11729
Thu, 28 Oct 2021 17:26:03 +0200 dirstate: use a single closure for get_flags
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 28 Oct 2021 17:26:03 +0200] rev 48290
dirstate: use a single closure for get_flags The previous code was overlooking fallback when neither symlink not exec was supported. The number of "variants" is getting too high, so I am consolidating this in a single closure that should be easier to maintains. This also ensure that fallback flags are always taken into account. (they are not user code yet, but small experimentation shown that the feature was working as intended.) A a small side effect we need to check for symlink support more lazily and this show up in the test in a couple of places. Differential Revision: https://phab.mercurial-scm.org/D11728
Fri, 30 Apr 2021 16:00:40 -0700 tests: allow Google's internal builds of clang-format to be used stable
Kyle Lippincott <spectral@google.com> [Fri, 30 Apr 2021 16:00:40 -0700] rev 48289
tests: allow Google's internal builds of clang-format to be used These builds do not actually include any Google-specific formatting changes; the only reason they don't include the LLVM version number is due to a decision to elide the version number from *all* LLVM/clang projects. For most builds of clang-format, even "unofficial" ones, the LLVM version will be displayed; example: ``` clang-format version 14.0.0 (https://github.com/llvm/llvm-project.git 1830ec94ac022ae0b6d6876fc2251e6b91e5931e) ``` The Google-internal build looks like this: ``` clang-format version google3-trunk (1830ec94ac022ae0b6d6876fc2251e6b91e5931e) ``` Differential Revision: https://phab.mercurial-scm.org/D10538
Tue, 26 Oct 2021 10:23:14 -0400 merge: with stable
Augie Fackler <augie@google.com> [Tue, 26 Oct 2021 10:23:14 -0400] rev 48288
merge: with stable
Tue, 26 Oct 2021 18:53:58 +0530 Added signature for changeset 6ee0244fc1cf stable
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 26 Oct 2021 18:53:58 +0530] rev 48287
Added signature for changeset 6ee0244fc1cf
Tue, 26 Oct 2021 18:53:51 +0530 Added tag 5.9.3 for changeset 6ee0244fc1cf stable
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 26 Oct 2021 18:53:51 +0530] rev 48286
Added tag 5.9.3 for changeset 6ee0244fc1cf
Mon, 25 Oct 2021 17:57:01 +0200 relnotes: update release notes for upcoming 5.9.3 stable 5.9.3
Raphaël Gomès <rgomes@octobus.net> [Mon, 25 Oct 2021 17:57:01 +0200] rev 48285
relnotes: update release notes for upcoming 5.9.3 Differential Revision: https://phab.mercurial-scm.org/D11720
Sat, 23 Oct 2021 17:13:57 -0400 typing: add more type hints to the errors module
Matt Harbison <matt_harbison@yahoo.com> [Sat, 23 Oct 2021 17:13:57 -0400] rev 48284
typing: add more type hints to the errors module These were found by looking for `Any` types in the generated `*.pyi` file after running the tests. There are some more complicated types that I'm not sure of, and am leaving untyped. I also can't figure out how to get `self.hint` to be anything other than `Any` in most classes. Differential Revision: https://phab.mercurial-scm.org/D11719
Sat, 23 Oct 2021 16:04:05 -0400 typing: add a few assertions to revlog.py to help pytype
Matt Harbison <matt_harbison@yahoo.com> [Sat, 23 Oct 2021 16:04:05 -0400] rev 48283
typing: add a few assertions to revlog.py to help pytype I've seen this before, but this was seen as potentially `None` with pytype 2021.10.18. Differential Revision: https://phab.mercurial-scm.org/D11718
Thu, 21 Oct 2021 09:22:06 +0200 dirstate: group return logic and clarify each function in flagfunc
Raphaël Gomès <rgomes@octobus.net> [Thu, 21 Oct 2021 09:22:06 +0200] rev 48282
dirstate: group return logic and clarify each function in flagfunc As suggested by spectral during review of my fix of the missing return, this makes it more obvious that all cases are covered and improves readability of the functions with new names and a small docstring. Differential Revision: https://phab.mercurial-scm.org/D11715
Wed, 20 Oct 2021 18:40:03 +0200 dirstate: add missing return on platforms without exec or symlink
Raphaël Gomès <rgomes@octobus.net> [Wed, 20 Oct 2021 18:40:03 +0200] rev 48281
dirstate: add missing return on platforms without exec or symlink Differential Revision: https://phab.mercurial-scm.org/D11713
Wed, 20 Oct 2021 18:25:49 +0200 parsers: don't ask about symlinks on platforms that don't support them
Raphaël Gomès <rgomes@octobus.net> [Wed, 20 Oct 2021 18:25:49 +0200] rev 48280
parsers: don't ask about symlinks on platforms that don't support them Otherwise the compiler gets quite sad. Differential Revision: https://phab.mercurial-scm.org/D11712
Wed, 20 Oct 2021 18:05:16 +0200 parsers: don't ask about the exec bit on platforms that don't have it
Raphaël Gomès <rgomes@octobus.net> [Wed, 20 Oct 2021 18:05:16 +0200] rev 48279
parsers: don't ask about the exec bit on platforms that don't have it Otherwise the compiler gets quite sad. Differential Revision: https://phab.mercurial-scm.org/D11711
Tue, 19 Oct 2021 18:06:07 -0700 tests: fix test-convert-git to work w/ "git pull" requiring strategy
Kyle Lippincott <spectral@google.com> [Tue, 19 Oct 2021 18:06:07 -0700] rev 48278
tests: fix test-convert-git to work w/ "git pull" requiring strategy A recent change to git (031e2f7ae195) made it an error to not specify a strategy (`--rebase`, `--no-rebase`, `--ff-only`), instead of just the warning it was previously. As far as I can tell, `--no-rebase` is the behavior we were getting before, and the only one that makes the test work. Differential Revision: https://phab.mercurial-scm.org/D11714
Thu, 21 Oct 2021 17:25:41 +0200 branching: merge stable into default
Raphaël Gomès <rgomes@octobus.net> [Thu, 21 Oct 2021 17:25:41 +0200] rev 48277
branching: merge stable into default
Thu, 21 Oct 2021 14:03:33 +0200 heptapod-ci: actually give pytest more time before timeout stable
Raphaël Gomès <rgomes@octobus.net> [Thu, 21 Oct 2021 14:03:33 +0200] rev 48276
heptapod-ci: actually give pytest more time before timeout `HGTEST_TIMEOUT` is overridden by `HGTEST_SLOWTIMEOUT` for tests marked as slow, which `test-check-pytype.t` is. So this whole time the timeout was 1500s (or 25 minutes), which is unfortunately not long enough for a *lot* of the times it's run on the CI. Differential Revision: https://phab.mercurial-scm.org/D11717
Wed, 20 Oct 2021 18:44:26 +0100 tests: better determinism in test-chg.t stable
Arseniy Alekseyev <aalekseyev@janestreet.com> [Wed, 20 Oct 2021 18:44:26 +0100] rev 48275
tests: better determinism in test-chg.t chg tests fail pretty often with "Sample count: *" line disappearing. It disappears because the sample count is zero, in which case a custom message is printed. This commit makes the test succeed in that case. Differential Revision: https://phab.mercurial-scm.org/D11716
Thu, 21 Oct 2021 11:21:21 +0200 hg: remove reserved identifiers
David Demelier <markand@malikania.fr> [Thu, 21 Oct 2021 11:21:21 +0200] rev 48274
hg: remove reserved identifiers Per 7.1.3 paragraph, from C draft: All identifiers that begin with an underscore and either an uppercase letter or another underscore are always reserved for any use.
Tue, 19 Oct 2021 16:05:20 +0200 python: compatibility for python 3.11 (issue6604) stable
Raphaël Gomès <rgomes@octobus.net> [Tue, 19 Oct 2021 16:05:20 +0200] rev 48273
python: compatibility for python 3.11 (issue6604) The `unittest._TextTestResult` alias has been removed. The "new" name has been available since 3.2, and we only support 3.5.3+. Differential Revision: https://phab.mercurial-scm.org/D11690
Wed, 20 Oct 2021 16:54:43 +0200 pyoxidizer: force pip to not use pep517 in order to be able to install hg stable
Raphaël Gomès <rgomes@octobus.net> [Wed, 20 Oct 2021 16:54:43 +0200] rev 48272
pyoxidizer: force pip to not use pep517 in order to be able to install hg Mercurial is not (yet) a pep517 package, but the presence of a pyproject.toml file tells newer-ish versions of pip that it should be one. This is related to 58fe6d127a01, and fixes pyoxidizer builds for the Heptapod CI. Differential Revision: https://phab.mercurial-scm.org/D11710
Tue, 19 Oct 2021 16:14:53 -0700 merge-halt: fix issue with merge.on-failure=halt breaking unshelve stable
Kyle Lippincott <spectral@google.com> [Tue, 19 Oct 2021 16:14:53 -0700] rev 48271
merge-halt: fix issue with merge.on-failure=halt breaking unshelve Differential Revision: https://phab.mercurial-scm.org/D11706
Tue, 19 Oct 2021 16:14:46 -0700 merge-halt: demonstrate unshelve issue with merge.on-failure=halt stable
Kyle Lippincott <spectral@google.com> [Tue, 19 Oct 2021 16:14:46 -0700] rev 48270
merge-halt: demonstrate unshelve issue with merge.on-failure=halt Differential Revision: https://phab.mercurial-scm.org/D11705
Tue, 19 Oct 2021 19:05:41 +0200 rust-nodemap: backed out mitigation for issue 6554 stable
Georges Racinet <georges.racinet@octobus.net> [Tue, 19 Oct 2021 19:05:41 +0200] rev 48269
rust-nodemap: backed out mitigation for issue 6554 This is a backout of changeset 3fffb48539ee. Issue 6554 is now considered solved, hence its mitigation has to be removed, if only for its performance cost. Differential Revision: https://phab.mercurial-scm.org/D11703
Mon, 18 Oct 2021 16:24:00 -0700 pyoxidizer: update README.md with several small fixes
Kyle Lippincott <spectral@google.com> [Mon, 18 Oct 2021 16:24:00 -0700] rev 48268
pyoxidizer: update README.md with several small fixes Currently, pyoxidizer.bzl does not mention the git commit that should be checked out, so these instructions are a bit difficult to follow right now (impossible, technically), so I removed the instruction to `git checkout <Git commit>` and the admonition to use a specific version of PyOxidizer. I don't even know if the project currently builds with the "0.7.0-pre" version that was previously recommended. As fallout from that change to not "pin" to a specific PyOxidizer, I had to update the Python version to use when running the tests. While here, I added a recommendation to use `--release`, as the primary reason for this project is performance, and it may have been leaving some on the table to not have that there. Differential Revision: https://phab.mercurial-scm.org/D11698
Mon, 18 Oct 2021 16:18:41 -0700 pyoxidizer: disable using in-memory resources
Kyle Lippincott <spectral@google.com> [Mon, 18 Oct 2021 16:18:41 -0700] rev 48267
pyoxidizer: disable using in-memory resources It's possible that the errors are due to using an incompatible version of PyOxidizer; unfortunately the README.md file in this directory says to fetch a copy of PyOxidizer matching the commit in this pyoxidizer.bzl file, and yet the pyoxidizer.bzl file does not actually have a commit mentioned in it. By disabling in-memory modules, this appears to work on all platforms using the current head version of PyOxidizer, so let's disable them for now. Sample error (during `pyoxidizer build`): ``` error[PYOXIDIZER_PYTHON_EXECUTABLE]: adding PythonExtensionModule<name=hgext.fsmonitor.pywatchman.bser> Caused by: extension module hgext.fsmonitor.pywatchman.bser cannot be loaded from memory but memory loading required --> ./pyoxidizer.bzl:140:5 | 140 | exe.add_python_resources(exe.pip_install(["--verbose", ROOT])) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ add_python_resources() error: adding PythonExtensionModule<name=hgext.fsmonitor.pywatchman.bser> Caused by: extension module hgext.fsmonitor.pywatchman.bser cannot be loaded from memory but memory loading required ``` Differential Revision: https://phab.mercurial-scm.org/D11697
Wed, 20 Oct 2021 00:21:41 +0200 dirstate-v2: reorder flag to group related one together
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 20 Oct 2021 00:21:41 +0200] rev 48266
dirstate-v2: reorder flag to group related one together Since the format is not frozen yet, it seems like the right moment to do it. Differential Revision: https://phab.mercurial-scm.org/D11704
Tue, 19 Oct 2021 20:14:17 +0200 dirstate-v2: read the fallback value in Rust
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 19 Oct 2021 20:14:17 +0200] rev 48265
dirstate-v2: read the fallback value in Rust This was overlooked in a previous commit. Differential Revision: https://phab.mercurial-scm.org/D11695
Tue, 19 Oct 2021 18:18:05 +0200 dirstate-v2: adjust the meaning of directory flags
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 19 Oct 2021 18:18:05 +0200] rev 48264
dirstate-v2: adjust the meaning of directory flags Tracking directory "explicitly" give use the opportunity to distinct between entry that are untracked because they are part of the directory structure and entry that are ignored/unknown files on the files system. The help is adjusted to the new semantic and the code now comply to it for both read and write. Differential Revision: https://phab.mercurial-scm.org/D11694
Wed, 13 Oct 2021 15:58:14 +0200 dirstate-v2: actually use sub-second mtime precision
Simon Sapin <simon.sapin@octobus.net> [Wed, 13 Oct 2021 15:58:14 +0200] rev 48263
dirstate-v2: actually use sub-second mtime precision Instead of zero, set the nanoseconds field to its correct value whenever possible and preserve it across serialization+parsing. Differential Revision: https://phab.mercurial-scm.org/D11702
Thu, 14 Oct 2021 13:54:39 +0200 dirstate: ignore sub-second component when either is zero in mtime
Simon Sapin <simon.sapin@octobus.net> [Thu, 14 Oct 2021 13:54:39 +0200] rev 48262
dirstate: ignore sub-second component when either is zero in mtime When comparing mtimes for equality. Some APIs simply return zero when more precision is not available. When comparing values from different sources, if only one is truncated in that way, doing a simple comparison would cause many false negatives. Differential Revision: https://phab.mercurial-scm.org/D11701
Tue, 19 Oct 2021 22:04:14 +0200 dirstate-v2: add a new MTIME_SECOND_AMBIGUOUS flags
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 19 Oct 2021 22:04:14 +0200] rev 48261
dirstate-v2: add a new MTIME_SECOND_AMBIGUOUS flags This flag will let us use more `mtime` value in the future. For now we have a minimal handling of the flag at read time, but we will never put ourself in a situation where we will needs to writes it. See the flag documentation for details. Differential Revision: https://phab.mercurial-scm.org/D11700
Mon, 18 Oct 2021 11:23:07 +0200 dirstate: store mtimes with nanosecond precision in memory
Simon Sapin <simon.sapin@octobus.net> [Mon, 18 Oct 2021 11:23:07 +0200] rev 48260
dirstate: store mtimes with nanosecond precision in memory Keep integer seconds since the Unix epoch, together with integer nanoseconds in the `0 <= n < 1e9` range. For now, nanoseconds are still always zero. This commit is about data structure changes. Differential Revision: https://phab.mercurial-scm.org/D11684
Tue, 19 Oct 2021 21:03:13 +0200 rust: remove now-unused DirstateEntry::clear_ambiguous_mtime method
Simon Sapin <simon.sapin@octobus.net> [Tue, 19 Oct 2021 21:03:13 +0200] rev 48259
rust: remove now-unused DirstateEntry::clear_ambiguous_mtime method Differential Revision: https://phab.mercurial-scm.org/D11696
(0) -30000 -10000 -3000 -1000 -240 +240 +1000 +3000 tip