Mercurial > public > mercurial-scm > hg-stable
diff mercurial/branchmap.py @ 42138:caebe5e7f4bd
repoview: move subsettable in a dedicated module
The dictionary got moved in `branchmap` to avoid import cycle. However, we are
about to needs it in repoview too. So we introduce a now module to define that
that mapping.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 12 Apr 2019 15:41:32 +0200 |
parents | f0203c3406e7 |
children | 07faf5c65190 09fd338522fa |
line wrap: on
line diff
--- a/mercurial/branchmap.py Fri Feb 01 15:51:02 2019 +0100 +++ b/mercurial/branchmap.py Fri Apr 12 15:41:32 2019 +0200 @@ -23,28 +23,17 @@ util, ) from .utils import ( + repoviewutil, stringutil, ) +subsettable = repoviewutil. subsettable + calcsize = struct.calcsize pack_into = struct.pack_into unpack_from = struct.unpack_from -### Nearest subset relation -# Nearest subset of filter X is a filter Y so that: -# * Y is included in X, -# * X - Y is as small as possible. -# This create and ordering used for branchmap purpose. -# the ordering may be partial -subsettable = {None: 'visible', - 'visible-hidden': 'visible', - 'visible': 'served', - 'served.hidden': 'served', - 'served': 'immutable', - 'immutable': 'base'} - - class BranchMapCache(object): """mapping of filtered views of repo with their branchcache""" def __init__(self):