# HG changeset patch # User Pierre-Yves David # Date 1490205285 -3600 # Node ID e2394b33ae519b145d3387f1045a09f4c0f5e0fc # Parent 3be48332b8029f86196dddae261c02518f2aa321 stablerange: use depthrevs in range slicing We stop using the property from the class to get us closer to tuple. diff -r 3be48332b802 -r e2394b33ae51 hgext3rd/evolve/stablerange.py --- a/hgext3rd/evolve/stablerange.py Wed Mar 22 18:53:25 2017 +0100 +++ b/hgext3rd/evolve/stablerange.py Wed Mar 22 18:54:45 2017 +0100 @@ -304,8 +304,9 @@ bottom = rangeid._revs[:localindex] top = stablerange(repo, rangeid[0], globalindex, rangeid._revs[localindex:]) # + rangedepth = repo.stablerange.depthrev(repo, rangeid[0]) toprootdepth = repo.stablerange.depthrev(repo, top._revs[0]) - if toprootdepth + self.rangelength(repo, top) == rangeid.depth + 1: + if toprootdepth + self.rangelength(repo, top) == rangedepth + 1: bheads = [bottom[-1]] else: bheads = set(bottom)