in mozci/push.py [0:0]
def _iterate_children(self, max_depth=None):
other = self
for i in itertools.count():
yield other
# Optimization to load child json-pushes data in a single query (up
# to MAX_DEPTH at a time).
next_id = other.id + 1
if next_id not in HgRev.JSON_PUSHES_CACHE:
depth = max_depth or MAX_DEPTH
HgRev.load_json_pushes_between_ids(
self.branch, other.id, next_id + depth - i
)
try:
other = other.child
except ChildPushNotFound:
break
if max_depth is not None and i == max_depth:
break