[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-doc-english
Subject:    Re: Regarding using KDiff3 merging tool
From:       Prashant Pahurkar <prashant.pahurkar () gmail ! com>
Date:       2016-08-23 11:29:32
Message-ID: CADpUMdmzJYYpqKCg294ki2KNwEbZeBec2zWWz5538o0uvD6dhQ () mail ! gmail ! com
[Download RAW message or body]

Hi Yuri,



Thanks for your reply.

I have few questions/clarification as below:



1.    *Yuri:-* 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.

Prashant: I have gone through the link you have shared above but I am not
very clear. My questions are :

a.    Do I need to install D-Bus as well in my system to use
choose_a_everywhere option before hand.
b.    Once kdiff3 is launched and when I give 2 input files for merging,
then I can choose a or b everywhere option but question is I need to
understand how do I set such option via the command line. Pls advise.

2.    Yuri: 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?

Prashant: I tried using diff3 which got available as part of KDiff3
installation (in the kdiff3\bin folder)

But I was unable to neither run the diff3 application directly nor via the
batch file using Call command by passing file as parameters

For eg:

call "C:\Program Files\kdiff3\bin\diff3.exe" "C:\Users\xxx\Documents\Rnd
Learning\n1.txt" "C:\Users\xxx\Documents\Rnd Learning\n2.txt" -o
"C:\Users\xxx\Documents\Rnd Learning\n3.txt"

Please advise on how do I use and invoke Diff3 which will merge 2 files
(With File A code dominating) and returning the output in 3rd file. All
this to be achieved through command line.

Thanks.


Regards,

Prashant



On Fri, Aug 12, 2016 at 1:00 PM, Yuri Chornoivan <yurchor@ukr.net> wrote:

> Hi,
>
> Please find some answers below.
>
> написане Fri, 12 Aug 2016 09:39:32 +0300, Prashant Pahurkar <
> prashant.pahurkar@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@gmail.com>
>> wrote:
>>
>> Gentle reminder. ..
>>> Awaiting your reply.
>>>
>>> On 10 Aug 2016 16:46, "Prashant Pahurkar" <prashant.pahurkar@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@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
>>> >>
>>> >
>>>
>>

[Attachment #3 (text/html)]

<div dir="ltr"><span style="color:rgb(68,84,106);font-family:&quot;Trebuchet \
MS&quot;,sans-serif;font-size:10pt"><p class="MsoNormal"><span \
style="color:rgb(68,84,106);font-family:&quot;Trebuchet \
MS&quot;,sans-serif;font-size:10pt">Hi Yuri,<u></u><u></u></span></p><p \
class="MsoNormal"><span style="color:rgb(68,84,106);font-family:&quot;Trebuchet \
MS&quot;,sans-serif;font-size:10pt"><u></u>  <u></u></span></p><p \
class="MsoNormal"><span style="color:rgb(68,84,106);font-family:&quot;Trebuchet \
MS&quot;,sans-serif;font-size:10pt">Thanks for your reply.<u></u><u></u></span></p><p \
class="MsoNormal"><span style="color:rgb(68,84,106);font-family:&quot;Trebuchet \
MS&quot;,sans-serif;font-size:10pt">I have few questions/clarification as \
below:<u></u><u></u></span></p><p class="MsoNormal"><span \
style="color:rgb(68,84,106);font-family:&quot;Trebuchet \
MS&quot;,sans-serif;font-size:10pt">                       \
<u></u><u></u></span></p><p><span \
style="color:rgb(68,84,106);font-family:&quot;Trebuchet \
MS&quot;,sans-serif;font-size:10pt"><span>1.<span style="font:7pt/normal &quot;Times \
New Roman&quot;;font-size-adjust:none;font-stretch:normal">       \
</span></span></span><u></u><u>Yuri:-</u> Anyway, KDiff3 (as any other KDE \
application) can be controlled with D-Bus. See the instructive article here:<span \
class="im"><br><a href="http://www.linuxjournal.com/article/10455" \
target="_blank">http://www.linuxjournal.com/<wbr>article/10455</a><br> You can easily \
found merge_choose_a_everywhere in the KDiff3 D-Bus tree under \
kdiff3/MainWindow_1/actions and set it.<br> Options can be passed through additional \
arguments to the Windows CALL.<span \
style="color:rgb(68,84,106);font-family:&quot;Trebuchet \
MS&quot;,sans-serif;font-size:10pt"><u></u><u></u></span></span></p><p \
class="MsoNormal" style="margin-left:36pt"><span \
style="color:rgb(31,78,121);font-family:&quot;Trebuchet \
MS&quot;,sans-serif;font-size:10pt">Prashant: I have gone through the link you have \
shared above but I am not very clear. My questions are : <u></u><u></u></span></p><p \
style="margin-left:54pt"><u></u><span \
style="color:rgb(31,78,121);font-family:&quot;Trebuchet \
MS&quot;,sans-serif;font-size:10pt"><span>a.<span style="font:7pt/normal &quot;Times \
New Roman&quot;;font-size-adjust:none;font-stretch:normal">       \
</span></span></span><u></u><span \
style="color:rgb(31,78,121);font-family:&quot;Trebuchet \
MS&quot;,sans-serif;font-size:10pt">Do I need to install D-Bus as well in my system \
to use choose_a_everywhere option before hand.<u></u><u></u></span></p><div \
style="margin-left:54pt"><u></u><span \
style="color:rgb(31,78,121);font-family:&quot;Trebuchet \
MS&quot;,sans-serif;font-size:10pt"><span>b.<span style="font:7pt/normal &quot;Times \
New Roman&quot;;font-size-adjust:none;font-stretch:normal">       \
</span></span></span><u></u><span \
style="color:rgb(31,78,121);font-family:&quot;Trebuchet \
MS&quot;,sans-serif;font-size:10pt">Once kdiff3 is launched and when I give 2 input \
files for merging, then I can choose a or b everywhere option but question is I need \
to understand how do I set such option via the command line. Pls advise.</span><span \
style="color:rgb(31,78,121)"><br></span></div><p><span \
style="color:rgb(31,78,121);font-family:&quot;Trebuchet \
MS&quot;,sans-serif;font-size:10pt"><span>2.<span style="font:7pt/normal &quot;Times \
New Roman&quot;;font-size-adjust:none;font-stretch:normal">       \
</span></span></span><u></u>Yuri:<span \
style="color:rgb(31,78,121);font-family:&quot;Trebuchet \
MS&quot;,sans-serif;font-size:10pt"> </span>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?<span \
style="color:rgb(31,78,121);font-family:&quot;Trebuchet \
MS&quot;,sans-serif;font-size:10pt"><u></u><u></u></span></p><p><span \
style="color:rgb(31,78,121);font-family:&quot;Trebuchet \
MS&quot;,sans-serif;font-size:10pt">Prashant: I tried using diff3 which got available \
as part of KDiff3 installation (in the kdiff3\bin folder) \
<u></u><u></u></span></p><p><span \
style="color:rgb(31,78,121);font-family:&quot;Trebuchet \
MS&quot;,sans-serif;font-size:10pt">But I was unable to neither run the diff3 \
application directly nor via the batch file using Call command by passing file as \
parameters<u></u><u></u></span></p><p><span \
style="color:rgb(31,78,121);font-family:&quot;Trebuchet \
MS&quot;,sans-serif;font-size:10pt">For eg:<u></u><u></u></span></p><p><span \
style="color:rgb(31,78,121);font-family:&quot;Trebuchet \
MS&quot;,sans-serif;font-size:10pt">call &quot;C:\Program \
Files\kdiff3\bin\diff3.exe&quot; &quot;C:\Users\xxx\Documents\Rnd \
Learning\n1.txt&quot; "C:\Users\xxx\Documents\Rnd Learning\n2.txt&quot; -o \
&quot;C:\Users\xxx\Documents\Rnd \
Learning\n3.txt&quot;<u></u><u></u></span></p><p><span \
style="color:rgb(31,78,121);font-family:&quot;Trebuchet \
MS&quot;,sans-serif;font-size:10pt">Please advise on how do I use and invoke Diff3 \
which will merge 2 files (With File A code dominating) and returning the output in \
3rd file. All this to be achieved through command line.</span></p><div><font \
color="#1f4e79"><br></font></div><span style="color:rgb(31,78,121)"><p>Thanks.</p><p \
class="MsoNormal"><br></p></span><p><span \
style="color:rgb(68,84,106);font-family:&quot;Trebuchet \
MS&quot;,sans-serif;font-size:10pt">Regards,<u></u><u></u></span></p><p \
class="MsoNormal"><span style="color:rgb(68,84,106);font-family:&quot;Trebuchet \
MS&quot;,sans-serif;font-size:10pt">Prashant</span></p></span><p \
class="MsoNormal"><br></p></div><div class="gmail_extra"><br><div \
class="gmail_quote">On Fri, Aug 12, 2016 at 1:00 PM, Yuri Chornoivan <span \
dir="ltr">&lt;<a href="mailto:yurchor@ukr.net" \
target="_blank">yurchor@ukr.net</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">Hi,<br> <br>
Please find some answers below.<br>
<br>
написане Fri, 12 Aug 2016 09:39:32 +0300, Prashant Pahurkar &lt;<a \
href="mailto:prashant.pahurkar@gmail.com" \
target="_blank">prashant.pahurkar@gmail.com</a>&gt;:<span><br> <br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">
 Gentle reminder.<br>
Please reply if it is possible to have the required functionality.<br>
<br>
Regards,<br>
Prashant<br>
On 11 Aug 2016 18:53, &quot;Prashant Pahurkar&quot; &lt;<a \
href="mailto:prashant.pahurkar@gmail.com" \
target="_blank">prashant.pahurkar@gmail.com</a>&gt;<br> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">
 Gentle reminder. ..<br>
Awaiting your reply.<br>
<br>
On 10 Aug 2016 16:46, &quot;Prashant Pahurkar&quot; &lt;<a \
href="mailto:prashant.pahurkar@gmail.com" \
target="_blank">prashant.pahurkar@gmail.com</a>&gt;<br> wrote:<br>
&gt;<br>
&gt; Hi Burkhard,<br>
&gt;<br>
&gt; Thanks for the reply.<br>
&gt; I have gone through the link you have shared but what I am looking out<br>
is somewhat different and is as follows:<br>
&gt; 1. I want to merge 2 files and auto resolve the conflict without any<br>
manunal intervention.<br>
&gt; Lets say I will provide the input as:- In Conflict situation it should<br>
always pick it up from File A and override.<br>
&gt; Is it possible without manual intervention.<br>
&gt; I guess this is possible by Manual intervention i.e. by choosing the<br>
option of selecting &quot;Choose A from everywhere&quot; - but how to achieve \
this<br> without manual intervention.<br>
&gt; It means how do I default or set the &quot;Choose A from everywhere&quot; \
option<br> before hand.<br>
</blockquote></blockquote>
<br></span>
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?<br> <br>
Anyway, KDiff3 (as any other KDE application) can be controlled with D-Bus. See the \
instructive article here:<br> <br>
<a href="http://www.linuxjournal.com/article/10455" target="_blank" \
rel="noreferrer">http://www.linuxjournal.com/ar<wbr>ticle/10455</a><br> <br>
You can easily found merge_choose_a_everywhere in the KDiff3 D-Bus tree under \
kdiff3/MainWindow_1/actions and set it.<br> <br>
Options can be passed through additional arguments to the Windows CALL.<br>
<br>
Hope this helps.<br>
<br>
Best regards,<br>
Yuri<div class="HOEnZb"><div class="h5"><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><blockquote \
class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">
 &gt;<br>
&gt; 2. In the above example how do I set this option when calling KDiff3<br>
from command prompt.<br>
&gt; For eg:<br>
&gt; I am using a batch file and using the following command<br>
&gt; call &quot;C:\Program Files\kdiff3\kdiff3.exe&quot; \
&quot;C:\Users\xx\Documents\Rnd<br> Learning\n1.txt&quot; \
                &quot;C:\Users\xx\Documents\Rnd Learning\n2.txt&quot;<br>
-o &quot;C:\Users\xx\Documents\Rnd Learning\n3.txt&quot;<br>
&gt; How do I get the merge output in n3.txt which will have the merge<br>
product of n1.txt and n2.txt?<br>
&gt; How do I set the option of &quot;Choose A from everywhere&quot; through the<br>
command prompt i.e What should I add in the above command line to achieve<br>
the &quot;Choose A from everywhere&quot; option.<br>
&gt; Awaiting your reply.<br>
&gt;<br>
&gt; Regards,<br>
&gt; Prashant<br>
&gt;<br>
&gt; On Tue, Aug 9, 2016 at 7:58 PM, Burkhard Lück &lt;<a \
href="mailto:lueck@hube-lueck.de" target="_blank">lueck@hube-lueck.de</a>&gt;<br> \
wrote:<br> &gt;&gt;<br>
&gt;&gt; Am Dienstag, 9. August 2016, 18:21:02 CEST schrieb Prashant Pahurkar:<br>
&gt;&gt; &gt; Hi,<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; I have certain doubts and clarification required wrt using KDiff3<br>
tool as<br>
&gt;&gt; &gt; follows:<br>
&gt;&gt; &gt; 1. I want to merge 2 files and auto resolve the conflict by adding<br>
first<br>
&gt;&gt; &gt; lines from File A and then appending it with Lines from B. Is it<br>
possible<br>
&gt;&gt; &gt; without manual intervention.<br>
&gt;&gt; &gt; 2. Also Can i achieve the same using command prompt.<br>
&gt;&gt; &gt; For ex: I am using a batch file and using the following command<br>
&gt;&gt; &gt; call &quot;C:\Program Files\kdiff3\kdiff3.exe&quot; --auto<br>
&gt;&gt; &gt; &quot;C:\Users\296170\Documents\Rnd Learning\n1.txt&quot;<br>
&gt;&gt; &gt; &quot;C:\Users\296170\Documents\Rnd Learning\n2.txt&quot; -o<br>
&gt;&gt; &gt; &quot;C:\Users\296170\Documents\Rnd Learning\n3.txt&quot;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; This will display the page where it will ask me to select from File \
A<br> or B<br>
&gt;&gt; &gt; to resolve the conflict. But through command prompt I would like to<br>
get the<br>
&gt;&gt; &gt; merge output in n3.txt which will have the merge product of n1.txt \
and<br> &gt;&gt; &gt; n2.txt.<br>
&gt;&gt; &gt; Please let me know if this is possible and what would be the \
command<br> to<br>
&gt;&gt; &gt; achieve this?<br>
&gt;&gt; &gt;<br>
&gt;&gt; Please read <a href="https://docs.kde.org/trunk4/en/extragear-utils/kdiff3/" \
target="_blank" rel="noreferrer">https://docs.kde.org/trunk4/en<wbr>/extragear-utils/kdiff3/</a><br>
 &gt;&gt; documentation.html#commandline<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; Burkhard Lück<br>
&gt;&gt;<br>
&gt;<br>
</blockquote></blockquote>
</div></div></blockquote></div><br></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic