##// END OF EJS Templates
revlog: drop reference to docket in the inline-splitting code...
marmoute -
r51981:31f14344 default
parent child Browse files
Show More
@@ -2563,6 +2563,10 b' class revlog:'
2563 if not self._inline or total_size < _maxinline:
2563 if not self._inline or total_size < _maxinline:
2564 return
2564 return
2565
2565
2566 if self._docket is not None:
2567 msg = b"inline revlog should not have a docket"
2568 raise error.ProgrammingError(msg)
2569
2566 troffset = tr.findoffset(self._indexfile)
2570 troffset = tr.findoffset(self._indexfile)
2567 if troffset is None:
2571 if troffset is None:
2568 raise error.RevlogError(
2572 raise error.RevlogError(
@@ -2634,13 +2638,11 b' class revlog:'
2634 self._inner.inline = False
2638 self._inner.inline = False
2635 for i in self:
2639 for i in self:
2636 e = self.index.entry_binary(i)
2640 e = self.index.entry_binary(i)
2637 if i == 0 and self._docket is None:
2641 if i == 0:
2638 header = self._format_flags | self._format_version
2642 header = self._format_flags | self._format_version
2639 header = self.index.pack_header(header)
2643 header = self.index.pack_header(header)
2640 e = header + e
2644 e = header + e
2641 fp.write(e)
2645 fp.write(e)
2642 if self._docket is not None:
2643 self._docket.index_end = fp.tell()
2644
2646
2645 # If we don't use side-write, the temp file replace the real
2647 # If we don't use side-write, the temp file replace the real
2646 # index when we exit the context manager
2648 # index when we exit the context manager
@@ -2655,8 +2657,6 b' class revlog:'
2655 if existing_handles:
2657 if existing_handles:
2656 # switched from inline to conventional reopen the index
2658 # switched from inline to conventional reopen the index
2657 index_end = None
2659 index_end = None
2658 if self._docket is not None:
2659 index_end = self._docket.index_end
2660 ifh = self._inner._InnerRevlog__index_write_fp(
2660 ifh = self._inner._InnerRevlog__index_write_fp(
2661 index_end=index_end
2661 index_end=index_end
2662 )
2662 )
General Comments 0
You need to be logged in to leave comments. Login now