comparison mercurial/changelog.py @ 51316: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 dcaa2df1f688
children 5b3b6db49bbb
comparison
equal deleted inserted replaced
51314:7e6aae033d8d 51316:178e50edb4f8
367 self._docket.write(tr) 367 self._docket.write(tr)
368 self._v2_delayed = False 368 self._v2_delayed = False
369 else: 369 else:
370 new_index_file = self._inner.finalize_pending() 370 new_index_file = self._inner.finalize_pending()
371 self._indexfile = new_index_file 371 self._indexfile = new_index_file
372 # split when we're done 372 if self._inline:
373 self._enforceinlinesize(tr, side_write=False) 373 msg = 'changelog should not be inline at that point'
374 raise error.ProgrammingError(msg)
374 375
375 def _writepending(self, tr): 376 def _writepending(self, tr):
376 """create a file containing the unfinalized state for 377 """create a file containing the unfinalized state for
377 pretxnchangegroup""" 378 pretxnchangegroup"""
378 assert not self._inner.is_open 379 assert not self._inner.is_open