[Request] [+ ] D11269: filelog: open the writing context a bit earlier in `addgroup`

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Sat Aug 7 14:07:49 UTC 2021


marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This is a small change made ahead of the next patch for clarification.

REPOSITORY
  rHG Mercurial

BRANCH
  stable

REVISION DETAIL
  https://phab.mercurial-scm.org/D11269

AFFECTED FILES
  mercurial/filelog.py

CHANGE DETAILS

diff --git a/mercurial/filelog.py b/mercurial/filelog.py
--- a/mercurial/filelog.py
+++ b/mercurial/filelog.py
@@ -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)



To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20210807/686a9a07/attachment.html>


More information about the Mercurial-patches mailing list