536
536
def _generate_all_revisions(branch, start_rev_id, end_rev_id, direction,
537
delayed_graph_generation):
537
delayed_graph_generation):
538
538
# On large trees, generating the merge graph can take 30-60 seconds
539
539
# so we delay doing it until a merge is detected, incrementally
540
540
# returning initial (non-merge) revisions while we can.
542
# The above is only true for old formats (<= 0.92), for newer formats, a
543
# couple of seconds only should be needed to load the whole graph and the
544
# other graph operations needed are even faster than that -- vila 100201
541
545
initial_revisions = []
542
546
if delayed_graph_generation:
544
for rev_id, revno, depth in \
545
_linear_view_revisions(branch, start_rev_id, end_rev_id):
548
for rev_id, revno, depth in _linear_view_revisions(
549
branch, start_rev_id, end_rev_id):
546
550
if _has_merges(branch, rev_id):
551
# The end_rev_id can be nested down somewhere. We need an
552
# explicit ancestry check. There is an ambiguity here as we
553
# may not raise _StartNotLinearAncestor for a revision that
554
# is an ancestor but not a *linear* one. But since we have
555
# loaded the graph to do the check (or calculate a dotted
556
# revno), we may as well accept to show the log...
558
graph = branch.repository.get_graph()
559
if not graph.is_ancestor(start_rev_id, end_rev_id):
560
raise _StartNotLinearAncestor()
547
561
end_rev_id = rev_id