changelog: stop useless enforcing split at the end of transaction
authorPierre-Yves David <pierre-yves.david@octobus.net>
Thu, 11 Jan 2024 16:35:52 +0100
changeset 51316 178e50edb4f8
parent 51314 7e6aae033d8d
child 51317 5b3b6db49bbb
changelog: stop useless enforcing split at the end of transaction Changelogs are no longer created inline, and existing changelogs are automatically split. Since we now enforce splitting at the start of any write, we don't need to enforce splitting at the end of the transaction. This has the nice side effect of killing the only user of "side_write".
mercurial/changelog.py
--- a/mercurial/changelog.py	Thu Jan 11 17:52:13 2024 +0100
+++ b/mercurial/changelog.py	Thu Jan 11 16:35:52 2024 +0100
@@ -369,8 +369,9 @@
         else:
             new_index_file = self._inner.finalize_pending()
             self._indexfile = new_index_file
-            # split when we're done
-            self._enforceinlinesize(tr, side_write=False)
+            if self._inline:
+                msg = 'changelog should not be inline at that point'
+                raise error.ProgrammingError(msg)
 
     def _writepending(self, tr):
         """create a file containing the unfinalized state for