[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: "Link" corresponding line versions on Left&Right

From: Hans-Emil Skogh <Hans-Emil.Skogh_at_tritech.se>
Date: Tue, 27 Apr 2010 08:21:05 +0200

> Sometimes when comparing 2 revisions of a versioned file, TortoiseMerge displays left & right
> versions of the same line on different positions (heights).
 
Yes, this is annoying but pretty unavoidable when it comes to text diffing software.

> Now, user can't do anything with it (if really he can - forgive me for bad request).
 
Well, you can always just edit the file directly in TortoiseMerge, so there isn't really that much of a problem. But you don't really get any help with the editing either, and you do lose the in-line diff...

> The suggestion is to let user mark versions of the same line as corresponding.
 
Good suggestion! +1
 
> Remember his choice for the future comparisons.
 
Maybe a not so good suggestion. You could remember the link for a specific comparison, but I don't know how oft you would get a match. (Specific file, specific revision, of both sides.) To try to remember links for paths only will most probably just make things worse. Just think of how much a file can change in a handful of revisions when it is under heavy development/refactoring.

> Store a set of line matchings for each versioned file. During comparisons use them in following way:
> 1. "Split" both file revisions by pairs of linked lines,
> 2. Compare each pair of corresponding parts individually,
> 3. Compare each pair of linked lines individually.

I think the way this works in Araxis Merge is close to ideal:
http://www.araxis.com/merge/topic_comparison_synchronization_links.html
 
(No, I'm not affiliated with them in any way, I just think that they do have a very nice app that does a LOT of things just right. :-) )
 
Implementing it that way in TortoiseMerge would probably be a heck of a lot of work. It would also be extremely nice for some cases though. :-)
 
> Maybe, to simplify algorithms, support line-linking only between adjacent file revisions.

I don't think that would do that much of a difference. The diff algorithm doesn't care about the relationship/ancestry between the files. It simply views them as two text files and does its best.
 
But to come with some additional ideas:
 
- Make it possible to in-line diff two lines that aren't matched up by TortoiseMerge. This could for example be implemented by clicking the first line to compare, and then ctrl-clicking the second line to force a in-line compare of these two lines.
 
- Remember the ctrl-click and let it be "sticky", so that when moves to that line in one side, the "new" corresponding line would be shown in the in-line diff.
 
- Implement a new pane located between the left and right sides that can visualize the linked lines (and make it easier to remove links). (This pane would also be very beneficial for visualizing the move-relationship for the new (great!) moved lines detection algorithm.)
 
- Lastly make TortoiseMerge re-evaluate the diff based on the new synchronization links provided by the user.
 
I think that these features could be implemented step by step, and possibly not even in order... Food for thought.
 
Hans-Emil

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=757&dsMessageId=2596617

To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2010-04-27 08:21:14 CEST

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.