# HG changeset patch # User Pierre-Yves David # Date 2023-03-02 13:45:29 # Node ID e27a5a0123231addb3c1794d0b58f4cebe5c2cad # Parent 774ed116dd7c3f5cf3b8eaaba3354f156981903b branch: pass current transaction when writing branch in backout command diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -837,7 +837,7 @@ def _dobackout(ui, repo, node=None, rev= return 1 else: hg.clean(repo, node, show_stats=False) - repo.dirstate.setbranch(branch) + repo.dirstate.setbranch(branch, repo.currenttransaction()) cmdutil.revert(ui, repo, rctx) if opts.get(b'no_commit'):