How do I get KDiff3 to automatically do a 3-way merge such that it shows no UI? Ideally, if it succeeds, it returns success, and if it can't (it needs manual merging), it returns an error code.
Everything I've read seems to imply that the following should work:
"c:\Program Files\KDiff3\kdiff3.exe" --auto base.txt src.txt tar.txt -o merge.txt
However, it doesn't. When I run it, a message box pops up that says:
Total number of conflicts: 3
Nr of automatically solved conflicts: 3
Nr of unsolved conflicts: 0
How do I get it to run without this popup, and no GUI at all if it fails?
KDiff3 offers automatic merge for these items at Merge item in the settings dialog. For simple lines that match the Auto merge regular expression option in all input-files KDiff3 will choose the line from B or - if available - from C.
KDiff3 is a file and directory diff and merge tool which compares and merges two or three text input files or directories, shows the differences line by line and character by character(!), provides an automatic merge-facility, has an editor for comfortable solving of merge-conflicts, provides networktransparency via ...
It is the first common ancestor. Often it is useful to have this to help decide which of the newer commits you want. Local is your local commit, the one in the current branch you are standing on. Remote is the remote commit, of the branch you are merging into your local one.
I figured it out. I need to add a "--cs" and "ShowInfoDialogs=0" to the command line. So this:
"c:\Program Files\KDiff3\kdiff3.exe" --auto base.txt src.txt tar.txt -o merge.txt
...becomes this:
"c:\Program Files\KDiff3\kdiff3.exe" --auto base.txt src.txt tar.txt -o merge.txt --cs "ShowInfoDialogs=0"
...and now it works.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With