changeset 51326:178e50edb4f8

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".
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 11 Jan 2024 16:35:52 +0100
parents 7e6aae033d8d
children 5b3b6db49bbb
files mercurial/changelog.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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