ZTree.com  | ZEN  | About...  

 Index   Back

KDiff3   [ZEP]

By: Martijn Coppoolse   Homepage   Voorburg, NL  
Date: Apr 08,2019 at 04:54
In Response to: WinMerge? And removes? (Peter Shute)

> I wonder if a utility like this would help:
> http://winmerge.org/?lang=en
> It can be run with command line or gui. I just had a play with its GUI,
> but it hurts my head working out what I need it to do. Simple adds and
> removes are ok, but things can change order too.
> And speaking of removes, what should ztree do if it's trying to merge
> history files after you've manually deleted an entry? Simple merging
> would bring it back again.

I prefer KDiff3 for such things. While it can compare files like WinMerge, KDiff3 also supports 3-way merge: if you can provide an ‘ancestor’ file (A), i.e. preceding both current versions (B and C), it can then figure out (and merge) the changes made in either file A or B. This basically only leaves conflicting changes (i.e. lines changed in both newer files) to be solved by a human — though everything can still be modified manually, if necessary.

For example: if you’ve removed an entry in one instance of ZTreeWin, but not in the other, it will see that it existed in the ‘ancestor’ ZTW.HST (to be called A), and that it still exists in B, but not in C. It will therefore conclude that it was removed in C, and that that is the change to be carried out. So the output of the merge will not contain that entry any longer.

Of course, if I understand the format correctly, the ‘zt=’ line will almost always change, so there will always be a conflict to resolve manually. A custom script or program would have the advantage there.

And it also requires a ‘common ancestor’ for both current files, which may not be easy to acquire.

I’ve looked at Ben’s PowerShell script, but I was too tired to figure (or even try) it out.


Thread locked

Messages in this Thread

94,975 Postings in 11,969 Threads, 349 registered users, 32 users online (1 registered, 31 guests)
Index | Admin contact |   Forum Time: May 26, 2020 - 7:13 pm EDT  |  Hits:31,237,378  (6,095 Today )
RSS Feed