diff -r 376395868b7b -r c166b212bdee mercurial/commands.py --- a/mercurial/commands.py Tue Dec 13 10:00:04 2022 +0100 +++ b/mercurial/commands.py Wed Jan 25 18:46:20 2023 +0100 @@ -6264,7 +6264,7 @@ # # All this should eventually happens, but in the mean time, we use this # context manager slightly out of the context it should be. - with repo.dirstate.parentchange(): + with repo.dirstate.parentchange(repo): mergestatemod.recordupdates(repo, ms.actions(), branchmerge, None) if not didwork and pats: