##// END OF EJS Templates
revlog: move the computation of the split_index path in a property...
marmoute -
r51554:978ffa09 stable
parent child Browse files
Show More
@@ -514,8 +514,8 b' class revlog:'
514 514 entry_point = b'%s.i.%s' % (self.radix, self.postfix)
515 515 elif self._trypending and self.opener.exists(b'%s.i.a' % self.radix):
516 516 entry_point = b'%s.i.a' % self.radix
517 elif self._try_split and self.opener.exists(b'%s.i.s' % self.radix):
518 entry_point = b'%s.i.s' % self.radix
517 elif self._try_split and self.opener.exists(self._split_index_file):
518 entry_point = self._split_index_file
519 519 else:
520 520 entry_point = b'%s.i' % self.radix
521 521
@@ -2020,6 +2020,14 b' class revlog:'
2020 2020 raise error.CensoredNodeError(self.display_id, node, text)
2021 2021 raise
2022 2022
2023 @property
2024 def _split_index_file(self):
2025 """the path where to expect the index of an ongoing splitting operation
2026
2027 The file will only exist if a splitting operation is in progress, but
2028 it is always expected at the same location."""
2029 return self.radix + b'.i.s'
2030
2023 2031 def _enforceinlinesize(self, tr, side_write=True):
2024 2032 """Check if the revlog is too big for inline and convert if so.
2025 2033
@@ -2056,7 +2064,7 b' class revlog:'
2056 2064 # this code
2057 2065 if side_write:
2058 2066 old_index_file_path = self._indexfile
2059 new_index_file_path = self._indexfile + b'.s'
2067 new_index_file_path = self._split_index_file
2060 2068 opener = self.opener
2061 2069 weak_self = weakref.ref(self)
2062 2070
General Comments 0
You need to be logged in to leave comments. Login now