mercurial/branchmap.py
changeset 42138 caebe5e7f4bd
parent 42134 f0203c3406e7
child 42173 07faf5c65190
child 42184 09fd338522fa
equal deleted inserted replaced
42137:d086ba387ae8 42138:caebe5e7f4bd
    21     pycompat,
    21     pycompat,
    22     scmutil,
    22     scmutil,
    23     util,
    23     util,
    24 )
    24 )
    25 from .utils import (
    25 from .utils import (
       
    26     repoviewutil,
    26     stringutil,
    27     stringutil,
    27 )
    28 )
       
    29 
       
    30 subsettable = repoviewutil. subsettable
    28 
    31 
    29 calcsize = struct.calcsize
    32 calcsize = struct.calcsize
    30 pack_into = struct.pack_into
    33 pack_into = struct.pack_into
    31 unpack_from = struct.unpack_from
    34 unpack_from = struct.unpack_from
    32 
       
    33 
       
    34 ### Nearest subset relation
       
    35 # Nearest subset of filter X is a filter Y so that:
       
    36 # * Y is included in X,
       
    37 # * X - Y is as small as possible.
       
    38 # This create and ordering used for branchmap purpose.
       
    39 # the ordering may be partial
       
    40 subsettable = {None: 'visible',
       
    41                'visible-hidden': 'visible',
       
    42                'visible': 'served',
       
    43                'served.hidden': 'served',
       
    44                'served': 'immutable',
       
    45                'immutable': 'base'}
       
    46 
    35 
    47 
    36 
    48 class BranchMapCache(object):
    37 class BranchMapCache(object):
    49     """mapping of filtered views of repo with their branchcache"""
    38     """mapping of filtered views of repo with their branchcache"""
    50     def __init__(self):
    39     def __init__(self):