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.
--- 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):