Mercurial > hg
annotate mercurial/utils/repoviewutil.py @ 49487:e8481625c582
rust: add Debug constraint to Matcher trait
This makes sure we can easily debug which Matcher we're looking at when using
trait objects, and is just generally useful. Effort to make the debugging
output nicer has been kept to a minimum, please feel free to improve.
author | Raphaël Gomès <rgomes@octobus.net> |
---|---|
date | Mon, 11 Jul 2022 11:59:13 +0200 |
parents | 6000f5b25c9b |
children | 1a9bdd0e1c44 |
rev | line source |
---|---|
42138
caebe5e7f4bd
repoview: move subsettable in a dedicated module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
1 # repoviewutil.py - constaints data relevant to repoview.py and other module |
caebe5e7f4bd
repoview: move subsettable in a dedicated module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
2 # |
caebe5e7f4bd
repoview: move subsettable in a dedicated module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
3 # Copyright 2012 Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
caebe5e7f4bd
repoview: move subsettable in a dedicated module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
4 # Logilab SA <contact@logilab.fr> |
caebe5e7f4bd
repoview: move subsettable in a dedicated module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
5 # |
caebe5e7f4bd
repoview: move subsettable in a dedicated module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
6 # This software may be used and distributed according to the terms of the |
caebe5e7f4bd
repoview: move subsettable in a dedicated module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
7 # GNU General Public License version 2 or any later version. |
caebe5e7f4bd
repoview: move subsettable in a dedicated module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
8 |
caebe5e7f4bd
repoview: move subsettable in a dedicated module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
9 |
caebe5e7f4bd
repoview: move subsettable in a dedicated module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
10 ### Nearest subset relation |
caebe5e7f4bd
repoview: move subsettable in a dedicated module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
11 # Nearest subset of filter X is a filter Y so that: |
caebe5e7f4bd
repoview: move subsettable in a dedicated module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
12 # * Y is included in X, |
caebe5e7f4bd
repoview: move subsettable in a dedicated module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
13 # * X - Y is as small as possible. |
caebe5e7f4bd
repoview: move subsettable in a dedicated module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
14 # This create and ordering used for branchmap purpose. |
caebe5e7f4bd
repoview: move subsettable in a dedicated module
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
15 # the ordering may be partial |
43076
2372284d9457
formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents:
42138
diff
changeset
|
16 subsettable = { |
43077
687b865b95ad
formatting: byteify all mercurial/ and hgext/ string literals
Augie Fackler <augie@google.com>
parents:
43076
diff
changeset
|
17 None: b'visible', |
687b865b95ad
formatting: byteify all mercurial/ and hgext/ string literals
Augie Fackler <augie@google.com>
parents:
43076
diff
changeset
|
18 b'visible-hidden': b'visible', |
687b865b95ad
formatting: byteify all mercurial/ and hgext/ string literals
Augie Fackler <augie@google.com>
parents:
43076
diff
changeset
|
19 b'visible': b'served', |
687b865b95ad
formatting: byteify all mercurial/ and hgext/ string literals
Augie Fackler <augie@google.com>
parents:
43076
diff
changeset
|
20 b'served.hidden': b'served', |
687b865b95ad
formatting: byteify all mercurial/ and hgext/ string literals
Augie Fackler <augie@google.com>
parents:
43076
diff
changeset
|
21 b'served': b'immutable', |
687b865b95ad
formatting: byteify all mercurial/ and hgext/ string literals
Augie Fackler <augie@google.com>
parents:
43076
diff
changeset
|
22 b'immutable': b'base', |
43076
2372284d9457
formatting: blacken the codebase
Augie Fackler <augie@google.com>
parents:
42138
diff
changeset
|
23 } |