Mercurial > evolve
changeset 3261:85160bd3f641
stablerange: make use of the limit argument in 'mergepoint'
This will eventually avoid doing full iteration on ancestors of the head when
retrieving the range content.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sun, 10 Dec 2017 01:38:48 +0100 |
parents | 2f0c113b35f8 |
children | 774f69d74ec2 |
files | hgext3rd/evolve/stablerange.py |
diffstat | 1 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/evolve/stablerange.py Sun Dec 10 01:33:39 2017 +0100 +++ b/hgext3rd/evolve/stablerange.py Sun Dec 10 01:38:48 2017 +0100 @@ -309,7 +309,16 @@ class stablerange_mergepoint(stablerangecached, stablerangedummy_mergepoint): """Stablerange implementation using 'mergepoint' based sorting """ - pass + + def revsfromrange(self, repo, rangeid): + """return revision contained in a range + + The range `(<head>, <skip>)` contains all revisions stable-sorted from + <head>, skipping the <index>th lower revisions. + """ + limit = self.rangelength(repo, rangeid) + return stablesort.stablesort_mergepoint_head_basic(repo, [rangeid[0]], + limit=limit) class stablerange(stablerangecached):