stablerange: introduce a smarte version of stablerange for 'mergepoint'
This implementation will using caching and smarter algorithm based on these
cache. For now it inherit most of it code from the dummy version for
convenience. The inheritance to the dummy version should be dropped eventually.
--- a/hgext3rd/evolve/stablerange.py Sun Dec 10 01:26:40 2017 +0100
+++ b/hgext3rd/evolve/stablerange.py Sun Dec 10 01:33:39 2017 +0100
@@ -77,6 +77,7 @@
'branchpoint': lambda repo: repo.stablerange,
'basic-branchpoint': lambda repo: stablerangebasic(),
'basic-mergepoint': lambda repo: stablerangedummy_mergepoint(),
+ 'mergepoint': lambda repo: stablerange_mergepoint(),
}
@eh.command(
@@ -305,6 +306,11 @@
headrev, index = rangeid[0], rangeid[1]
return self.depthrev(repo, headrev) - index
+class stablerange_mergepoint(stablerangecached, stablerangedummy_mergepoint):
+ """Stablerange implementation using 'mergepoint' based sorting
+ """
+ pass
+
class stablerange(stablerangecached):
def __init__(self, lrusize=2000):
--- a/tests/test-stablerange.t Sun Dec 10 01:26:40 2017 +0100
+++ b/tests/test-stablerange.t Sun Dec 10 01:33:39 2017 +0100
@@ -9,7 +9,7 @@
> [ui]
> logtemplate = "{rev} {node|short} {desc} {tags}\n"
> [defaults]
- > debugstablerange = --method basic-mergepoint
+ > debugstablerange = --method mergepoint
> EOF
Simple linear test