mercurial/revlogutils/nodemap.py
changeset 48693 de3ac3d2c60b
parent 48690 d55c4472bbb6
child 48875 6000f5b25c9b
equal deleted inserted replaced
48692:4933086bebf5 48693:de3ac3d2c60b
    14 
    14 
    15 from ..node import hex
    15 from ..node import hex
    16 
    16 
    17 from .. import (
    17 from .. import (
    18     error,
    18     error,
       
    19     requirements,
    19     util,
    20     util,
    20 )
    21 )
    21 from . import docket as docket_mod
    22 from . import docket as docket_mod
    22 
    23 
    23 
    24 
    30     """hook point for test
    31     """hook point for test
    31 
    32 
    32     This let tests to have things happens between the docket reading and the
    33     This let tests to have things happens between the docket reading and the
    33     data reading"""
    34     data reading"""
    34     pass
    35     pass
       
    36 
       
    37 
       
    38 def post_stream_cleanup(repo):
       
    39     """The stream clone might needs to remove some file if persisten nodemap
       
    40     was dropped while stream cloning
       
    41     """
       
    42     if requirements.REVLOGV1_REQUIREMENT not in repo.requirements:
       
    43         return
       
    44     if requirements.NODEMAP_REQUIREMENT in repo.requirements:
       
    45         return
       
    46     unfi = repo.unfiltered()
       
    47     delete_nodemap(None, unfi, unfi.changelog)
       
    48     delete_nodemap(None, repo, unfi.manifestlog._rootstore._revlog)
    35 
    49 
    36 
    50 
    37 def persisted_data(revlog):
    51 def persisted_data(revlog):
    38     """read the nodemap for a revlog from disk"""
    52     """read the nodemap for a revlog from disk"""
    39     if revlog._nodemap_file is None:
    53     if revlog._nodemap_file is None: