qannotate "annotate this revision" could try to be smart about what line to move to

Bug #404288 reported by John A Meinel
6
This bug affects 1 person
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.

Tags: qannotate

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
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.