##// END OF EJS Templates
revlog: add a `canonical_index_file` attribute on inner revlog...
marmoute -
r51998:af96fbb8 default
parent child Browse files
Show More
@@ -411,6 +411,10 b' class _InnerRevlog:'
411 411 self._segmentfile.clear_cache()
412 412 self._segmentfile_sidedata.clear_cache()
413 413
414 @property
415 def canonical_index_file(self):
416 return self.index_file
417
414 418 # Derived from index values.
415 419
416 420 def start(self, rev):
@@ -1034,7 +1038,7 b' class _InnerRevlog:'
1034 1038 transaction.add(self.data_file, offset)
1035 1039 if self.sidedata_file:
1036 1040 transaction.add(self.sidedata_file, sidedata_offset)
1037 transaction.add(self.index_file, curr * len(entry))
1041 transaction.add(self.canonical_index_file, curr * len(entry))
1038 1042 if data[0]:
1039 1043 dfh.write(data[0])
1040 1044 dfh.write(data[1])
@@ -1043,7 +1047,7 b' class _InnerRevlog:'
1043 1047 ifh.write(entry)
1044 1048 else:
1045 1049 offset += curr * self.index.entry_size
1046 transaction.add(self.index_file, offset)
1050 transaction.add(self.canonical_index_file, offset)
1047 1051 ifh.write(entry)
1048 1052 ifh.write(data[0])
1049 1053 ifh.write(data[1])
@@ -2833,13 +2837,13 b' class revlog:'
2833 2837 msg = b"inline revlog should not have a docket"
2834 2838 raise error.ProgrammingError(msg)
2835 2839
2836 troffset = tr.findoffset(self._indexfile)
2840 troffset = tr.findoffset(self._inner.canonical_index_file)
2837 2841 if troffset is None:
2838 2842 raise error.RevlogError(
2839 2843 _(b"%s not found in the transaction") % self._indexfile
2840 2844 )
2841 2845 if troffset:
2842 tr.addbackup(self._indexfile, for_offset=True)
2846 tr.addbackup(self._inner.canonical_index_file, for_offset=True)
2843 2847 tr.add(self._datafile, 0)
2844 2848
2845 2849 new_index_file_path = None
General Comments 0
You need to be logged in to leave comments. Login now