branch: pass current transaction when writing branch in keyword
authorPierre-Yves David <pierre-yves.david@octobus.net>
Thu, 02 Mar 2023 14:44:26 +0100
changeset 50258 dba3593555e5
parent 50257 a301f0fad046
child 50259 a44e489940e0
branch: pass current transaction when writing branch in keyword
hgext/keyword.py
--- a/hgext/keyword.py	Thu Mar 02 14:44:17 2023 +0100
+++ b/hgext/keyword.py	Thu Mar 02 14:44:26 2023 +0100
@@ -535,7 +535,7 @@
             repo[None].add([fn])
         ui.note(_(b'\nkeywords written to %s:\n') % fn)
         ui.note(keywords)
-        repo.dirstate.setbranch(b'demobranch')
+        repo.dirstate.setbranch(b'demobranch', repo.currenttransaction())
         for name, cmd in ui.configitems(b'hooks'):
             if name.split(b'.', 1)[0].find(b'commit') > -1:
                 repo.ui.setconfig(b'hooks', name, b'', b'keyword')