GNOME Bugzilla – Bug 362233
Manual sync points for diff
Last modified: 2013-05-19 13:47:56 UTC
I'd like to be able to give some advice to the diff routines. Somthing like "a piece of text starts and ands at these two positions" for each file. This would produce a lot better results for several use cases.
*** Bug 588092 has been marked as a duplicate of this bug. ***
Just a quick note on what this would (at a guess) entail... FileDiff would need to be able to have multiple Differs mapped to different sections of text, editing text would have to dispatch changes to the correct Differ, and then the results of all Differs would need to be merged before being passed on to the drawing methods. And, of course, there would also need to be a reasonable UI for setting sync points.
Araxis does this quite well - you right click in the area between the text areas and it inserts an arrow between the two sides. The arrow heads can then be dragged to the appropriate line. I don't think there's a UI for keyboardists except to type the two line numbers. As Kai says, the "sync point" is more of a "split point". Effectively you get two different differs for above and below the sync point.
Created attachment 239655 [details] [review] Diff backend patch
Created attachment 239656 [details] [review] PEP fixes
Created attachment 239657 [details] [review] Horrendously dodgy UI for split feature
These patches and some additional bits have been pushed to git (hash 659649 and onwards) and will show up in 1.7.2. Thanks for the bug report.