# HG changeset patch # User Pierre-Yves David # Date 2023-03-02 13:46:37 # Node ID 240a04cedd2412a5f837e4b51a2b523e3bacbb67 # Parent 921f4834b7b5db12dd7dcea75d5e70b73a37edc3 branch: pass current transaction when writing branch for transaction backup This will requires more change soon (as we can simplify this backup). This will be done in later changesets. diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -2675,7 +2675,7 @@ class localrepository: ds = self.dirstate if ds.branch() == b'default': # force a file to be written if None exist - ds.setbranch(b'default') + ds.setbranch(b'default', None) # we cannot simply add "branch" to `all_file_names` because branch # is written outside of the transaction control. So we need to # backup early.