Mercurial > public > mercurial-scm > hg-stable
diff contrib/perf.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 | 912d82daeda3 |
children | 563cd9a72682 |
line wrap: on
line diff
--- a/contrib/perf.py Fri Feb 01 15:51:02 2019 +0100 +++ b/contrib/perf.py Fri Apr 12 15:41:32 2019 +0200 @@ -94,6 +94,10 @@ except ImportError: pass try: + from mercurial.utils import repoviewutil # since 5.0 +except ImportError: + repoviewutil = None +try: from mercurial import scmutil # since 1.9 (or 8b252e826c68) except ImportError: pass @@ -471,7 +475,8 @@ # subsettable is defined in: # - branchmap since 2.9 (or 175c6fd8cacc) # - repoview since 2.5 (or 59a9f18d4587) - for mod in (branchmap, repoview): + # - repoviewutil since 5.0 + for mod in (branchmap, repoview, repoviewutil): subsettable = getattr(mod, 'subsettable', None) if subsettable: return subsettable