Mercurial > public > mercurial-scm > hg-stable
diff tests/test-parseindex2.py @ 48536:52034c42c09d
rank: add a "rank" value to the revlog-entry tuple
The rank of a revision is the size of sub-graph it defines as a head. In other
words, the rank of X is the size of `ancestors(X)` (X included).
This is a property that can help various algorithm and we intend to store it in
changelog-v2. We start with adding this new information to the "entry tuple",
with a default value. We will start to compute and persist the rank later.
Differential Revision: https://phab.mercurial-scm.org/D11936
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 14 Dec 2021 23:56:38 +0100 |
parents | 2b69555e4875 |
children | 1bb62821f080 |
line wrap: on
line diff
--- a/tests/test-parseindex2.py Wed Dec 15 14:50:07 2021 +0100 +++ b/tests/test-parseindex2.py Tue Dec 14 23:56:38 2021 +0100 @@ -57,6 +57,7 @@ 0, constants.COMP_MODE_INLINE, constants.COMP_MODE_INLINE, + constants.RANK_UNKNOWN, ) nodemap[e[7]] = n append(e) @@ -72,6 +73,7 @@ 0, constants.COMP_MODE_INLINE, constants.COMP_MODE_INLINE, + constants.RANK_UNKNOWN, ) nodemap[e[7]] = n append(e) @@ -268,6 +270,7 @@ 0, constants.COMP_MODE_INLINE, constants.COMP_MODE_INLINE, + constants.RANK_UNKNOWN, ) index, junk = parsers.parse_index2(data_inlined, True) got = index[-1] @@ -303,6 +306,7 @@ 0, constants.COMP_MODE_INLINE, constants.COMP_MODE_INLINE, + constants.RANK_UNKNOWN, ) index.append(e)