# HG changeset patch # User Pierre-Yves David # Date 1677764721 -3600 # Node ID 774ed116dd7c3f5cf3b8eaaba3354f156981903b # Parent e60f9168263cea7e91e8fbcb9a173335bcda8651 branch: pass current transaction when writing branch in branch command diff -r e60f9168263c -r 774ed116dd7c mercurial/commands.py --- a/mercurial/commands.py Thu Mar 02 14:44:43 2023 +0100 +++ b/mercurial/commands.py Thu Mar 02 14:45:21 2023 +0100 @@ -1355,7 +1355,7 @@ with repo.wlock(): if opts.get(b'clean'): label = repo[b'.'].branch() - repo.dirstate.setbranch(label) + repo.dirstate.setbranch(label, repo.currenttransaction()) ui.status(_(b'reset working directory to branch %s\n') % label) elif label: @@ -1371,7 +1371,7 @@ hint=_(b"use 'hg update' to switch to it"), ) - repo.dirstate.setbranch(label) + repo.dirstate.setbranch(label, repo.currenttransaction()) ui.status(_(b'marked working directory as branch %s\n') % label) # find any open named branches aside from default