changeset 49413:b5c8524827d2 stable 6.2.2

dirstate-v2: no longer register the data-file during transaction If the data file change during the transaction, we cannot truncate it. The content of the file itself is fine as it will get backed up at the same time as the docket. Leaving the trailing data at the end of failed transaction is fine. The dirstate-v2 format supports it. The dead data will simply we written over if necessary.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 01 Sep 2022 15:49:14 +0200
parents 2905b78fc52e
children a601da09a1e2
files mercurial/dirstatemap.py
diffstat 1 files changed, 0 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/dirstatemap.py	Tue Aug 30 17:05:19 2022 +0200
+++ b/mercurial/dirstatemap.py	Thu Sep 01 15:49:14 2022 +0200
@@ -115,8 +115,6 @@
             self.parents(), len(packed), meta
         )
         data_filename = new_docket.data_filename()
-        if tr:
-            tr.add(data_filename, 0)
         self._opener.write(data_filename, packed)
         # Write the new docket after the new data file has been
         # written. Because `st` was opened with `atomictemp=True`,