narrow: open the transaction sooner when unbundling
authorPierre-Yves David <pierre-yves.david@octobus.net>
Thu, 23 Feb 2023 04:36:19 +0100
changeset 50229 34db5692d537
parent 50228 6065a8936b00
child 50230 99faa396e186
narrow: open the transaction sooner when unbundling That way, the narrow spec changes will be done within a transaction.
hgext/narrow/narrowbundle2.py
--- a/hgext/narrow/narrowbundle2.py	Thu Feb 23 04:35:16 2023 +0100
+++ b/hgext/narrow/narrowbundle2.py	Thu Feb 23 04:36:19 2023 +0100
@@ -261,6 +261,7 @@
     # other servers may include a changespec part even when not widening (e.g.
     # because we're deepening a shallow repo).
     if util.safehasattr(repo, 'setnewnarrowpats'):
+        op.gettransaction()
         repo.setnewnarrowpats()