qannotate "annotate this revision" could try to be smart about what line to move to
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QBzr |
Fix Released
|
Medium
|
Gary van der Merwe |
Bug Description
The ability to switch to an older revision for qannotate is very nice, especially doing it via the per file graph.
One thing I've noticed is that often when jumping to an older revision often the lines have moved. Which means that you have to search around to find the context. It often won't be possible to find an exact match, especially when the whole point is that you want to see what the line looked like *before* it was modified.
One possibility would be to do a 2-way diff, and see what lines match between the previous annotated text and the text you are about to display, and then make a best guess about what line to end on. For example:
you were on line 100
doing a diff, you see that lines 0-50 match lines 0-50, and that lines 75-99 match lines 51-75
then it is likely that you have 24 lines removed, and should move the pointer to line 76 instead of 100.
There is the possibility of getting too smart, and ending up somewhere random, however I think we will generally end up somewhere better than we do today.
Related branches
Changed in qbzr: | |
importance: | Undecided → Wishlist |
status: | New → Confirmed |
Changed in qbzr: | |
importance: | Wishlist → Medium |
tags: | added: qannotate |
Changed in qbzr: | |
assignee: | nobody → Gary van der Merwe (garyvdm) |
milestone: | none → 0.19b2 |
status: | Confirmed → Fix Released |