All histories should be linear
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Trac-Bzr |
Fix Released
|
Medium
|
Martin von Gagern |
Bug Description
When viewing the log of a mainline revision (i.e. simple revno), only mainline ancestors (i.e. the "history") are displayed. However, if the starting revision is from a merged branch (i.e. dootted revno or a corresponding revid), then the whole ancestry gets displayed, i.e. revisions from possibly many parallel branches. Both trac and human readers have problems with this, in particular as ordering of these revisions is somewhat arbitrary.
What trac can do, and can do really well, is a linear history. Every branch has a linear history. The current mainline does, these are the simple revision numbers. But every branch merged into mainline does as well. There should be a simple linear mainline path for every revision back to the initial null: revision. I guess it can be obtained by always following the first parent. This would yield dotted revisions from the same branch that contained the starting revision, but not from branches merged into that one.
The other direction is a bit less clear, but I guess that one can look for the earliest mainline revision having the revision in question as an ancestor, and always taking the correct turns in this fashion. Not sure we need a forward history of non-mainline revisions, though.
So I propose to re-implement the history generation to create a simple linear revision as described above.
Related branches
- Trac-bzr-team: Pending requested
-
Diff: 82 lines (+25/-29)1 file modifiedtracbzr/backend.py (+25/-29)
Changed in trac-bzr: | |
assignee: | nobody → Martin von Gagern (gagern) |
Changed in trac-bzr: | |
importance: | Undecided → Medium |
milestone: | none → 0.3.0 |
status: | New → In Progress |
Changed in trac-bzr: | |
status: | In Progress → Fix Committed |
Changed in trac-bzr: | |
status: | Fix Committed → Fix Released |
bzrlib. branch. Branch. _lefthand_ history should do the trick, at least for preceding revisions. The question is, should I use inofficial bzr API or should I copy&paste the implementation of that method? I tend towards the latter.