changeset 50263:798e4314ddd9

branch: pass current transaction when writing branch in import
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 02 Mar 2023 14:45:39 +0100
parents e27a5a012323
children 921f4834b7b5
files mercurial/cmdutil.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Thu Mar 02 14:45:29 2023 +0100
+++ b/mercurial/cmdutil.py	Thu Mar 02 14:45:39 2023 +0100
@@ -2031,7 +2031,9 @@
             repo.setparents(p1.node(), p2.node())
 
         if opts.get(b'exact') or importbranch:
-            repo.dirstate.setbranch(branch or b'default')
+            repo.dirstate.setbranch(
+                branch or b'default', repo.currenttransaction()
+            )
 
         partial = opts.get(b'partial', False)
         files = set()