Show More
@@ -487,7 +487,7 b' class revlog(object):' | |||||
487 | raise |
|
487 | raise | |
488 | return b'' |
|
488 | return b'' | |
489 |
|
489 | |||
490 | def _loadindex(self): |
|
490 | def _loadindex(self, docket=None): | |
491 |
|
491 | |||
492 | new_header, mmapindexthreshold, force_nodemap = self._init_opts() |
|
492 | new_header, mmapindexthreshold, force_nodemap = self._init_opts() | |
493 |
|
493 | |||
@@ -498,6 +498,10 b' class revlog(object):' | |||||
498 | else: |
|
498 | else: | |
499 | entry_point = b'%s.i' % self.radix |
|
499 | entry_point = b'%s.i' % self.radix | |
500 |
|
500 | |||
|
501 | if docket is not None: | |||
|
502 | self._docket = docket | |||
|
503 | self._docket_file = entry_point | |||
|
504 | else: | |||
501 | entry_data = b'' |
|
505 | entry_data = b'' | |
502 | self._initempty = True |
|
506 | self._initempty = True | |
503 | entry_data = self._get_data(entry_point, mmapindexthreshold) |
|
507 | entry_data = self._get_data(entry_point, mmapindexthreshold) | |
@@ -537,6 +541,8 b' class revlog(object):' | |||||
537 | self._docket = docketutil.parse_docket( |
|
541 | self._docket = docketutil.parse_docket( | |
538 | self, entry_data, use_pending=self._trypending |
|
542 | self, entry_data, use_pending=self._trypending | |
539 | ) |
|
543 | ) | |
|
544 | ||||
|
545 | if self._docket is not None: | |||
540 | self._indexfile = self._docket.index_filepath() |
|
546 | self._indexfile = self._docket.index_filepath() | |
541 | index_data = b'' |
|
547 | index_data = b'' | |
542 | index_size = self._docket.index_end |
|
548 | index_size = self._docket.index_end |
General Comments 0
You need to be logged in to leave comments.
Login now