diff -r a44e489940e0 -r e60f9168263c mercurial/merge.py --- a/mercurial/merge.py Thu Mar 02 14:44:33 2023 +0100 +++ b/mercurial/merge.py Thu Mar 02 14:44:43 2023 +0100 @@ -2229,7 +2229,9 @@ util.unlink(repo.vfs.join(b'updatestate')) if not branchmerge: - repo.dirstate.setbranch(p2.branch()) + repo.dirstate.setbranch( + p2.branch(), repo.currenttransaction() + ) # If we're updating to a location, clean up any stale temporary includes # (ex: this happens during hg rebase --abort).