# Linear future and merge point information

trac-bzr 0.3 introduced a linear history in most places, often replacing a previous topologically sorted ancestry. It would be nice to have a similar linear view of the future of a given revision. This might differ from branch to branch. It could be implemented in a way similar to Graph.merge_order. The basic idea is this:

1. find the earliest revision in the lefthand history of the tip that does integrate the requested revision

2. if that integrating revision is the requested revision, we know how we got there; the way back is the future

3. otherwise, find the (leftmost) parent integrating the requested revision, and use it as tip for a recursion starting at 1

In addition to the "next" revision, this approach also finds the revision when a given revision was integrated into mainline. It might even be possible to extend this in order to compare revisions in such a way that the one integrated earlier compares as less than the one integrated later on. Sidelines would sort later than mainline. This could yield an intuitive total order on revisions, suitable to decide rev_older_than requests.

All this computation might be possibly expensive, especially somewhere in the middle of a big graph, as one would have to traverse large portions of the graph. Therefore these calculations are best implemented with caching in mind.

## Blueprint information

- Status:
- Not started

- Approver:
- Martin von Gagern

- Priority:
- Low

- Drafter:
- Martin von Gagern

- Direction:
- Approved

- Assignee:
- None

- Definition:
- Drafting

- Series goal:
- None

- Implementation:
- Unknown

- Milestone target:
- None

- Started by

- Completed by