##// END OF EJS Templates
stabletailgraph: clarify excl part size computation
pacien -
r51419:4fd2f7ab default
parent child Browse files
Show More
@@ -108,6 +108,9 b' def _stable_tail_sort_naive(cl, head_rev'
108 if a not in tail_ancestors
108 if a not in tail_ancestors
109 )
109 )
110
110
111 # Notice that excl(cur) is disjoint from ancestors(pt),
112 # so there is no double-counting:
113 # rank(cur) = len([cur]) + len(excl(cur)) + rank(pt)
111 excl_part_size = cl.fast_rank(cursor_rev) - cl.fast_rank(pt) - 1
114 excl_part_size = cl.fast_rank(cursor_rev) - cl.fast_rank(pt) - 1
112 yield from itertools.islice(exclusive_ancestors, excl_part_size)
115 yield from itertools.islice(exclusive_ancestors, excl_part_size)
113 cursor_rev = pt
116 cursor_rev = pt
General Comments 0
You need to be logged in to leave comments. Login now