Regarding using KDiff3 merging tool

Yuri Chornoivan yurchor at ukr.net
Fri Aug 12 07:30:45 UTC 2016


Hi,

Please find some answers below.

написане Fri, 12 Aug 2016 09:39:32 +0300, Prashant Pahurkar  
<prashant.pahurkar at gmail.com>:

> Gentle reminder.
> Please reply if it is possible to have the required functionality.
>
> Regards,
> Prashant
> On 11 Aug 2016 18:53, "Prashant Pahurkar" <prashant.pahurkar at gmail.com>
> wrote:
>
>> Gentle reminder. ..
>> Awaiting your reply.
>>
>> On 10 Aug 2016 16:46, "Prashant Pahurkar" <prashant.pahurkar at gmail.com>
>> wrote:
>> >
>> > Hi Burkhard,
>> >
>> > Thanks for the reply.
>> > I have gone through the link you have shared but what I am looking out
>> is somewhat different and is as follows:
>> > 1. I want to merge 2 files and auto resolve the conflict without any
>> manunal intervention.
>> > Lets say I will provide the input as:- In Conflict situation it should
>> always pick it up from File A and override.
>> > Is it possible without manual intervention.
>> > I guess this is possible by Manual intervention i.e. by choosing the
>> option of selecting "Choose A from everywhere" - but how to achieve this
>> without manual intervention.
>> > It means how do I default or set the "Choose A from everywhere" option
>> before hand.

Hmm... If you need non-interactive tool then why did you choose Kdiff3?  
Why not use its backend (diff3 from diffutils), fc from Windows or  
WinMerge command line part?

Anyway, KDiff3 (as any other KDE application) can be controlled with  
D-Bus. See the instructive article here:

http://www.linuxjournal.com/article/10455

You can easily found merge_choose_a_everywhere in the KDiff3 D-Bus tree  
under kdiff3/MainWindow_1/actions and set it.

Options can be passed through additional arguments to the Windows CALL.

Hope this helps.

Best regards,
Yuri

>> >
>> > 2. In the above example how do I set this option when calling KDiff3
>> from command prompt.
>> > For eg:
>> > I am using a batch file and using the following command
>> > call "C:\Program Files\kdiff3\kdiff3.exe" "C:\Users\xx\Documents\Rnd
>> Learning\n1.txt" "C:\Users\xx\Documents\Rnd Learning\n2.txt"
>> -o "C:\Users\xx\Documents\Rnd Learning\n3.txt"
>> > How do I get the merge output in n3.txt which will have the merge
>> product of n1.txt and n2.txt?
>> > How do I set the option of "Choose A from everywhere" through the
>> command prompt i.e What should I add in the above command line to  
>> achieve
>> the "Choose A from everywhere" option.
>> > Awaiting your reply.
>> >
>> > Regards,
>> > Prashant
>> >
>> > On Tue, Aug 9, 2016 at 7:58 PM, Burkhard Lück <lueck at hube-lueck.de>
>> wrote:
>> >>
>> >> Am Dienstag, 9. August 2016, 18:21:02 CEST schrieb Prashant Pahurkar:
>> >> > Hi,
>> >> >
>> >> > I have certain doubts and clarification required wrt using KDiff3
>> tool as
>> >> > follows:
>> >> > 1. I want to merge 2 files and auto resolve the conflict by adding
>> first
>> >> > lines from File A and then appending it with Lines from B. Is it
>> possible
>> >> > without manual intervention.
>> >> > 2. Also Can i achieve the same using command prompt.
>> >> > For ex: I am using a batch file and using the following command
>> >> > call "C:\Program Files\kdiff3\kdiff3.exe" --auto
>> >> > "C:\Users\296170\Documents\Rnd Learning\n1.txt"
>> >> > "C:\Users\296170\Documents\Rnd Learning\n2.txt" -o
>> >> > "C:\Users\296170\Documents\Rnd Learning\n3.txt"
>> >> >
>> >> > This will display the page where it will ask me to select from  
>> File A
>> or B
>> >> > to resolve the conflict. But through command prompt I would like to
>> get the
>> >> > merge output in n3.txt which will have the merge product of n1.txt  
>> and
>> >> > n2.txt.
>> >> > Please let me know if this is possible and what would be the  
>> command
>> to
>> >> > achieve this?
>> >> >
>> >> Please read https://docs.kde.org/trunk4/en/extragear-utils/kdiff3/
>> >> documentation.html#commandline
>> >>
>> >> --
>> >> Burkhard Lück
>> >>
>> >


More information about the kde-doc-english mailing list