filelog: open the writing context a bit earlier in `addgroup`
This is a small change made ahead of the next patch for clarification.
Differential Revision: https://phab.mercurial-scm.org/D11269
--- a/mercurial/filelog.py Sat Aug 07 12:39:01 2021 +0200
+++ b/mercurial/filelog.py Sat Aug 07 14:13:53 2021 +0200
@@ -157,13 +157,14 @@
)
)
- return self._revlog.addgroup(
- deltas,
- linkmapper,
- transaction,
- addrevisioncb=addrevisioncb,
- duplicaterevisioncb=duplicaterevisioncb,
- )
+ with self._revlog._writing(transaction):
+ return self._revlog.addgroup(
+ deltas,
+ linkmapper,
+ transaction,
+ addrevisioncb=addrevisioncb,
+ duplicaterevisioncb=duplicaterevisioncb,
+ )
def getstrippoint(self, minlink):
return self._revlog.getstrippoint(minlink)