Mon, 20 Feb 2023 11:37:05 +0100 lfconvert: use a `changing_parents` context to clear the dirstate
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 20 Feb 2023 11:37:05 +0100] rev 50159
lfconvert: use a `changing_parents` context to clear the dirstate Not sure if this is the right context, but it works and it is consistent with the other usages of `dirstate.clear`.
Mon, 20 Feb 2023 11:57:46 +0100 dirstate: mark the `copy` method as requiring a `changing_any` context
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 20 Feb 2023 11:57:46 +0100] rev 50158
dirstate: mark the `copy` method as requiring a `changing_any` context This is used both when changing parents (e.g. merging with rename) and changing files (e.g. running `hg rename`).
Mon, 20 Feb 2023 11:54:10 +0100 dirstate: add a `require_changing_any` decorator
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 20 Feb 2023 11:54:10 +0100] rev 50157
dirstate: add a `require_changing_any` decorator We will need it for a couple of usecase (e.g `dirstate.copy`).
Mon, 20 Feb 2023 12:06:03 +0100 rebase: scope parent change into a changing_parents context
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 20 Feb 2023 12:06:03 +0100] rev 50156
rebase: scope parent change into a changing_parents context If we are actually altering the working copy (i.e. we are not in memory), we should properly scope the working copy update.
Sat, 18 Feb 2023 04:10:08 +0100 dirstate: requires being in a `changing_parents` `context to set_parents`
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 18 Feb 2023 04:10:08 +0100] rev 50155
dirstate: requires being in a `changing_parents` `context to set_parents` Enforcing proper operation scoping on all methods that mutate the dirstate will tighten correctness and reduce the risk of bugs. The context to use for this method is obvious, and all code was already compliant ☺
Tue, 21 Feb 2023 00:10:20 +0100 dirstate: invalidate on all exceptions
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 21 Feb 2023 00:10:20 +0100] rev 50154
dirstate: invalidate on all exceptions Previously, we would miss SystemExit, KeyboardInterrupt etc. This "fix" on the bug tested in "test-largefiles-update.t" by preventing the precisely tested situation to happens at all. However this reveal a similar bug with a different timing. I have not been able to deal with that pre-existing bug so far. So I updated the test to point that out.
Tue, 21 Feb 2023 01:09:11 +0100 large-files: prepare a test for more changes
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 21 Feb 2023 01:09:11 +0100] rev 50153
large-files: prepare a test for more changes The behavior around this test is about to change. We update the test to make it more robust and the changes clearer.
Tue, 21 Feb 2023 00:32:40 +0100 large-files: larger "changing_parents" context in mergeupdate override
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 21 Feb 2023 00:32:40 +0100] rev 50152
large-files: larger "changing_parents" context in mergeupdate override This since we are updating the lfdirstate early, it seems reasonable to include the full function in that scope.
Sun, 19 Feb 2023 03:14:44 +0100 large-files: use `hacky_extension_update_file` one more time
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 19 Feb 2023 03:14:44 +0100] rev 50151
large-files: use `hacky_extension_update_file` one more time This override is about merging and can be used in a `changing_parents` context. So lets use the method dedicated to hacky stuff when doing hacky stuff.
Sun, 19 Feb 2023 00:04:53 -0500 typing: disable `signature-mismatch` warnings on a few bytestr functions
Matt Harbison <matt_harbison@yahoo.com> [Sun, 19 Feb 2023 00:04:53 -0500] rev 50150
typing: disable `signature-mismatch` warnings on a few bytestr functions Recent versions of pytype complain about this, but it seems like expected behavior.
Sat, 18 Feb 2023 02:39:32 +0100 branching: merge with stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 18 Feb 2023 02:39:32 +0100] rev 50149
branching: merge with stable
Thu, 16 Feb 2023 14:56:59 +0000 rhg: fix a bug in path_encode
Arseniy Alekseyev <aalekseyev@janestreet.com> [Thu, 16 Feb 2023 14:56:59 +0000] rev 50148
rhg: fix a bug in path_encode This makes rhg able to access long paths at the root of the tree just fine.
Thu, 16 Feb 2023 14:54:34 +0000 rhg: demonstrate a bug in path_encode
Arseniy Alekseyev <aalekseyev@janestreet.com> [Thu, 16 Feb 2023 14:54:34 +0000] rev 50147
rhg: demonstrate a bug in path_encode The bug means that long filenames at the root of the tree are encoded incorrectly by rhg, so rhg crashes when trying to access them.
Thu, 16 Feb 2023 14:43:46 +0000 rhg: nicer error message
Arseniy Alekseyev <aalekseyev@janestreet.com> [Thu, 16 Feb 2023 14:43:46 +0000] rev 50146
rhg: nicer error message
Tue, 14 Feb 2023 12:40:59 -0500 typing: add type hints to argument checking functions in cmdutil
Matt Harbison <matt_harbison@yahoo.com> [Tue, 14 Feb 2023 12:40:59 -0500] rev 50145
typing: add type hints to argument checking functions in cmdutil These might be surprising, since they can take strings instead of bytes. The way `AnyStr` works is that it must be all bytes or all str for any given invocation. The wildcard here will be the `opts` that get passed in- if the type is unknown and defaults to `Any`, there's no enforcement that the dict key type matches the additional args. But a lot of uses should be using `**opts` from the command method, which has a str key. The uses of these methods in this module are now typed because their internals force a specific type, and it can't just be inferred from the caller.
Tue, 14 Feb 2023 15:45:26 -0500 tag: move the prohibition of tagging the `null` rev up to the `wdir()` check
Matt Harbison <matt_harbison@yahoo.com> [Tue, 14 Feb 2023 15:45:26 -0500] rev 50144
tag: move the prohibition of tagging the `null` rev up to the `wdir()` check It makes sense to do these together, and avoid another revision lookup.
Fri, 17 Feb 2023 17:04:41 +0100 branching: merge with default
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 17 Feb 2023 17:04:41 +0100] rev 50143
branching: merge with default the first part of the fix is there
Fri, 27 Jan 2023 17:30:51 +0100 tests: remove unnecessary --traceback argument
Dan Villiom Podlaski Christiansen <dan.villiom.podlaski.christiansen@sallinggroup.com> [Fri, 27 Jan 2023 17:30:51 +0100] rev 50142
tests: remove unnecessary --traceback argument
Thu, 16 Feb 2023 04:49:35 +0100 dirstate: remove the dedicated backup logic
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 16 Feb 2023 04:49:35 +0100] rev 50141
dirstate: remove the dedicated backup logic When alone, the dirstate can now take care of its commit/rollback pattern itself. When in a transaction, the transaction deal with commit/rollback pattern quite fine. Why did you have a dedicated backup logic?
Thu, 16 Feb 2023 04:02:36 +0100 localrepo: stop doing special dirstate backup at transaction open
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 16 Feb 2023 04:02:36 +0100] rev 50140
localrepo: stop doing special dirstate backup at transaction open Since the dirstate writes are already managed by the transaction, we already do a backup of the dirstate when necessary (and even trigger one to keep `hg rollback` happy). We needs some special code to deal with the initial empty checkout, but it is not too complicated. Managing variable filename (as dirstate-v2 uses) at the "journalfile" level, is complex and fragile (which is consistent with the fact these files are not journal…). If we no longer do it, our life is significantly simpler. In some sense, we apply the xkcd-1134¹ solution to our savebackup/restorebackup problem. [1] https://xkcd.com/1134/ (the change to test-hardlink are expect as decreasing the number of duplicated backup drive the hardlink count down)
Thu, 16 Feb 2023 11:42:43 +0100 localrepo: "blindly" do a dirstate backup at the end of the transaction
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 16 Feb 2023 11:42:43 +0100] rev 50139
localrepo: "blindly" do a dirstate backup at the end of the transaction Having the file backup mechanism dealing with file backup as benefit. So lets move closer to that. The fact `hg rollback` even needs this is sad. I hope to have the time to implement one of the alternative soon.
Thu, 16 Feb 2023 17:12:21 +0100 test-hardlink: stop explicitly listing `undo.dirstate`
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 16 Feb 2023 17:12:21 +0100] rev 50138
test-hardlink: stop explicitly listing `undo.dirstate` The files is on its way out.
Thu, 16 Feb 2023 04:04:40 +0100 localrepo: enforce a clean dirstate when the transaction open
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 16 Feb 2023 04:04:40 +0100] rev 50137
localrepo: enforce a clean dirstate when the transaction open This is important to simplify the backup process. This also seems like a quite reasonable expectation. See inline documentation for details.
Thu, 16 Feb 2023 10:43:22 +0100 dirstate: explicitly backup the datafile
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 16 Feb 2023 10:43:22 +0100] rev 50136
dirstate: explicitly backup the datafile Since the transaction does not know about this file, we need to explicitly mark it for backup before touching it.
Thu, 16 Feb 2023 04:41:38 +0100 mq: write the dirstate before stripping
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 16 Feb 2023 04:41:38 +0100] rev 50135
mq: write the dirstate before stripping I am not certain why it is dirty (probably the `repo.setparent` call a right before. However I know we need it flushed before the repository starts to be stripped.
Thu, 16 Feb 2023 03:08:00 +0100 dirstate: simplify the shelve hack to not go through the disk
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 16 Feb 2023 03:08:00 +0100] rev 50134
dirstate: simplify the shelve hack to not go through the disk We already have the data in memory, so why not simply keep the data in memory? This avoid abusing the `savebackup/restorebackup` logic and will make our life easier.
Thu, 16 Feb 2023 02:44:07 +0100 dirstate: detect potential fishy transaction patterns while changing
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 16 Feb 2023 02:44:07 +0100] rev 50133
dirstate: detect potential fishy transaction patterns while changing If we rely on the transaction more, we should be more careful about the transaction. Adding extra security seems reasonable.
Thu, 16 Feb 2023 02:34:54 +0100 dirstate: generalize the dirstate's invalidation on transaction abort
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 16 Feb 2023 02:34:54 +0100] rev 50132
dirstate: generalize the dirstate's invalidation on transaction abort The previous code was too specific, we should add the invalidation at next to the `addfilegenerator` in the `write` call.
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -28 +28 +50 +100 +300 +1000 tip