Patchwork D11269: filelog: open the writing context a bit earlier in `addgroup`

login
register
mail settings
Submitter phabricator
Date Aug. 7, 2021, 2:07 p.m.
Message ID <differential-rev-PHID-DREV-muti2cozhl3ilhbxasm2-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49583/
State Superseded
Headers show

Comments

phabricator - Aug. 7, 2021, 2:07 p.m.
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




To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

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)