Changeset View
Changeset View
Standalone View
Standalone View
swh/loader/mercurial/from_disk.py
Show First 20 Lines • Show All 151 Lines • ▼ Show 20 Lines | ): | ||||
# Cache the content hash across revisions to avoid recalculation. | # Cache the content hash across revisions to avoid recalculation. | ||||
self._content_hash_cache: hgutil.LRUCacheDict = hgutil.LRUCacheDict( | self._content_hash_cache: hgutil.LRUCacheDict = hgutil.LRUCacheDict( | ||||
content_cache_size, | content_cache_size, | ||||
) | ) | ||||
# hg node id of the latest snapshot branch heads | # hg node id of the latest snapshot branch heads | ||||
# used to find what are the new revisions since last snapshot | # used to find what are the new revisions since last snapshot | ||||
self._latest_heads: List[HgNodeId] = [] | self._latest_heads: List[bytes] = [] | ||||
self._load_status = "eventful" | self._load_status = "eventful" | ||||
# If set, will override the default value | # If set, will override the default value | ||||
self._visit_status = None | self._visit_status = None | ||||
def pre_cleanup(self) -> None: | def pre_cleanup(self) -> None: | ||||
"""As a first step, will try and check for dangling data to cleanup. | """As a first step, will try and check for dangling data to cleanup. | ||||
This should do its best to avoid raising issues. | This should do its best to avoid raising issues. | ||||
▲ Show 20 Lines • Show All 450 Lines • Show Last 20 Lines |