revlog: synchronise the various attribute holding the index filename
The segmentfile and the attribute need to be synchronized, let's enforce that.
--- a/mercurial/revlog.py Thu Oct 19 01:50:07 2023 +0200
+++ b/mercurial/revlog.py Wed Oct 25 01:02:47 2023 +0200
@@ -358,7 +358,7 @@
self.opener = opener
self.index = index
- self.index_file = index_file
+ self.__index_file = index_file
self.data_file = data_file
self.sidedata_file = sidedata_file
self.inline = inline
@@ -381,6 +381,16 @@
self.data_config.chunk_cache_size,
)
+ @property
+ def index_file(self):
+ return self.__index_file
+
+ @index_file.setter
+ def index_file(self, new_index_file):
+ self.__index_file = new_index_file
+ if self.inline:
+ self._segmentfile.filename = new_index_file
+
# Derived from index values.
def start(self, rev):