comparison kdiff3/doc/en/index.docbook @ 73:f7dad0aa6146

KDiff3-0.9.90-Qt4
author joachim99
date Sun, 14 May 2006 20:09:06 +0000
parents 8febbfb1148c
children 1184fc843210
comparison
equal deleted inserted replaced
72:2bb0f4dc64c0 73:f7dad0aa6146
1 <?xml version="1.0" ?> 1 <?xml version="1.0" ?>
2 <!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.1.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [ 2 <!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
3 <!ENTITY kdiff3 "<application>KDiff3</application>"> 3 <!ENTITY kdiff3 "<application>KDiff3</application>">
4 <!ENTITY kappname "&kdiff3;"> 4 <!ENTITY kappname "&kdiff3;">
5 <!ENTITY package "extragear-utils"> 5 <!ENTITY package "extragear-utils">
6 <!ENTITY % addindex "IGNORE"> 6 <!ENTITY % addindex "IGNORE">
7 <!ENTITY % English "INCLUDE"> 7 <!ENTITY % English "INCLUDE">
23 <!--</personname>--> 23 <!--</personname>-->
24 <affiliation><address> 24 <affiliation><address>
25 <email>joachim.eibl at gmx.de</email> 25 <email>joachim.eibl at gmx.de</email>
26 </address></affiliation> 26 </address></affiliation>
27 </author> 27 </author>
28 <!-- TRANS:ROLES_OF_TRANSLATORS -->
28 </authorgroup> 29 </authorgroup>
29
30 <!-- TRANS:ROLES_OF_TRANSLATORS -->
31 30
32 <copyright> 31 <copyright>
33 <year>2002-2006</year> 32 <year>2002-2006</year>
34 <holder>Joachim Eibl</holder> 33 <holder>Joachim Eibl</holder>
35 </copyright> 34 </copyright>
43 need them for translation coordination ! 42 need them for translation coordination !
44 Please respect the format of the date (YYYY-MM-DD) and of the version 43 Please respect the format of the date (YYYY-MM-DD) and of the version
45 (V.MM.LL), it could be used by automation scripts. 44 (V.MM.LL), it could be used by automation scripts.
46 Do NOT change these in the translation. --> 45 Do NOT change these in the translation. -->
47 46
48 <date>2006-04-09</date> 47 <date>2006-05-14</date>
49 <releaseinfo>0.9.89</releaseinfo> 48 <releaseinfo>0.9.90</releaseinfo>
50 49
51 50
52 <abstract> 51 <abstract>
53 <para></para>
54 <para> 52 <para>
55 &kdiff3; is a file and directory diff and merge tool which 53 &kdiff3; is a file and directory diff and merge tool which
56 <itemizedlist> 54 <itemizedlist>
57 <listitem><para>compares and merges two or three text input files or directories,</para></listitem> 55 <listitem><para>compares and merges two or three text input files or directories,</para></listitem>
58 <listitem><para>shows the differences line by line and character by character(!),</para></listitem> 56 <listitem><para>shows the differences line by line and character by character(!),</para></listitem>
63 <listitem><para>supports Unicode, UTF-8 and other file encodings,</para></listitem> 61 <listitem><para>supports Unicode, UTF-8 and other file encodings,</para></listitem>
64 <listitem><para>prints differences,</para></listitem> 62 <listitem><para>prints differences,</para></listitem>
65 <listitem><para>supports version control keyword and history merging.</para></listitem> 63 <listitem><para>supports version control keyword and history merging.</para></listitem>
66 </itemizedlist> 64 </itemizedlist>
67 </para><para> 65 </para><para>
68 This document describes KDiff3-version 0.9.89. 66 This document describes &kdiff3;-version 0.9.89.
69 </para> 67 </para>
70 </abstract> 68 </abstract>
71 69
72 <!-- This is a set of Keywords for indexing by search engines. 70 <!-- This is a set of Keywords for indexing by search engines.
73 Please at least include KDE, the KDE package it is in, the name 71 Please at least include KDE, the KDE package it is in, the name
99 </bookinfo> 97 </bookinfo>
100 98
101 <chapter id="introduction"><title>Introduction</title> 99 <chapter id="introduction"><title>Introduction</title>
102 <sect1 id="why"><title>Yet Another Diff Frontend?</title> 100 <sect1 id="why"><title>Yet Another Diff Frontend?</title>
103 <para> 101 <para>
104 Several graphical diff tools exist. Why choose KDiff3? Let me say, why I wrote it. 102 Several graphical diff tools exist. Why choose &kdiff3;? Let me say, why I wrote it.
105 </para><para> 103 </para><para>
106 KDiff3 started because I had to do a difficult merge. Merging is necessary when several 104 &kdiff3; started because I had to do a difficult merge. Merging is necessary when several
107 people work on the same files in a project. A merge can be somewhat automated, when the 105 people work on the same files in a project. A merge can be somewhat automated, when the
108 merge-tool not only has the new modified files (called "branches"), but also the original file 106 merge-tool not only has the new modified files (called "branches"), but also the original file
109 (called "base"). The merge tool will automatically choose any modification that was only 107 (called "base"). The merge tool will automatically choose any modification that was only
110 done in one branch. When several contributors change the same lines, then the merge tool 108 done in one branch. When several contributors change the same lines, then the merge tool
111 detects a conflict which must be solved manually. 109 detects a conflict which must be solved manually.
125 paste it into either diff window. 123 paste it into either diff window.
126 </para><para> 124 </para><para>
127 A feature that required a big effort was the directory comparison and merge facility, which turned 125 A feature that required a big effort was the directory comparison and merge facility, which turned
128 the program almost into a full file browser. 126 the program almost into a full file browser.
129 </para><para> 127 </para><para>
130 I hope KDiff3 works for you too. Have fun! 128 I hope &kdiff3; works for you too. Have fun!
131 </para><para> 129 </para><para>
132 Joachim Eibl (2003) 130 Joachim Eibl (2003)
133 </para> 131 </para>
134 </sect1> 132 </sect1>
135 133
136 <sect1 id="screenshots"><title>Screenshots and Features</title> 134 <sect1 id="screenshots"><title>Screenshots and Features</title>
137 <para>This screenshot shows the difference between two text files</para> 135 <para>This screenshot shows the difference between two text files</para>
138 <para>(Using an early version of KDiff3):</para> 136 <para>(Using an early version of &kdiff3;):</para>
139 <screenshot><mediaobject> 137 <screenshot><mediaobject>
140 <imageobject><imagedata fileref="screenshot_diff.png" format="PNG"/></imageobject> 138 <imageobject><imagedata fileref="screenshot_diff.png" format="PNG"/></imageobject>
141 </mediaobject></screenshot> 139 </mediaobject></screenshot>
142 140
143 <para> 141 <para>
144 3-way-merging is fully supported. This is useful if two people change code independently. 142 3-way-merging is fully supported. This is useful if two people change code independently.
145 The original file (the base) is used to help KDiff3 to automatically select the correct 143 The original file (the base) is used to help &kdiff3; to automatically select the correct
146 changes. 144 changes.
147 The merge-editor below the diff-windows allows you to solve conflicts, while showing you the output you will get. 145 The merge-editor below the diff-windows allows you to solve conflicts, while showing you the output you will get.
148 You can even edit the output. 146 You can even edit the output.
149 This screenshot shows three input files being merged: 147 This screenshot shows three input files being merged:
150 </para><para> 148 </para><para>
151 <screenshot><mediaobject> 149 <screenshot><mediaobject>
152 <imageobject><imagedata fileref="screenshot_merge.png" format="PNG"/></imageobject> 150 <imageobject><imagedata fileref="screenshot_merge.png" format="PNG"/></imageobject>
153 </mediaobject></screenshot> 151 </mediaobject></screenshot>
154 </para> 152 </para>
155 153
156 <para id="dirmergebigscreenshot">KDiff3 also helps you to compare and merge complete directories. 154 <para id="dirmergebigscreenshot">&kdiff3; also helps you to compare and merge complete directories.
157 This screenshot shows KDiff3 during a directory merge: 155 This screenshot shows &kdiff3; during a directory merge:
158 </para><para> 156 </para><para>
159 <screenshot><mediaobject> 157 <screenshot><mediaobject>
160 <imageobject><imagedata fileref="dirmergebig.png" format="PNG"/></imageobject> 158 <imageobject><imagedata fileref="dirmergebig.png" format="PNG"/></imageobject>
161 </mediaobject></screenshot> 159 </mediaobject></screenshot>
162 </para> 160 </para>
163 </sect1> 161 </sect1>
164 162
165 <sect1 id="features"><title>More Features</title> 163 <sect1 id="features"><title>More Features</title>
166 <sect2><title> Line-By-Line And Char-By-Char Diff-Viewer</title> 164 <sect2><title> Line-By-Line And Char-By-Char Diff-Viewer</title>
167 <para>By using the possiblities of a graphical color display KDiff3 shows 165 <para>By using the possiblities of a graphical color display &kdiff3; shows
168 exactly what the difference is. When you have to do many code-reviews, you will like this. 166 exactly what the difference is. When you have to do many code-reviews, you will like this.
169 </para> 167 </para>
170 <screenshot><mediaobject> 168 <screenshot><mediaobject>
171 <imageobject><imagedata fileref="letter_by_letter.png" format="PNG"/></imageobject> 169 <imageobject><imagedata fileref="letter_by_letter.png" format="PNG"/></imageobject>
172 </mediaobject></screenshot> 170 </mediaobject></screenshot>
196 <imageobject><imagedata fileref="triple_diff.png" format="PNG"/></imageobject> 194 <imageobject><imagedata fileref="triple_diff.png" format="PNG"/></imageobject>
197 </mediaobject></screenshot> 195 </mediaobject></screenshot>
198 </sect2> 196 </sect2>
199 197
200 <sect2><title> Comfortable Merge Of Two Or Three Input Files</title> 198 <sect2><title> Comfortable Merge Of Two Or Three Input Files</title>
201 <para> KDiff3 can be used to merge two or three input files and automatically 199 <para> &kdiff3; can be used to merge two or three input files and automatically
202 merges as much as possible. The result is presented in an editable window 200 merges as much as possible. The result is presented in an editable window
203 where most conflicts can be solved with a single mouseclick: Select the 201 where most conflicts can be solved with a single mouseclick: Select the
204 buttons A/B/C from the button-bar to select the source that should be used. 202 buttons A/B/C from the button-bar to select the source that should be used.
205 You can also select more than one source. Since this output window is an 203 You can also select more than one source. Since this output window is an
206 editor even conflicts which need further corrections can be solved here without 204 editor even conflicts which need further corrections can be solved here without
309 --cs string Override a config setting. Use once for every setting. E.g.: --cs "AutoAdvance=1" 307 --cs string Override a config setting. Use once for every setting. E.g.: --cs "AutoAdvance=1"
310 --confighelp Show list of config settings and current values. 308 --confighelp Show list of config settings and current values.
311 --config file Use a different config file. 309 --config file Use a different config file.
312 </screen> 310 </screen>
313 <para>The option <option>--cs</option> allows you to adjust a configuration value that is otherwise only adjustable via the configure dialogs. 311 <para>The option <option>--cs</option> allows you to adjust a configuration value that is otherwise only adjustable via the configure dialogs.
314 But be aware that when KDiff3 then terminates the changed value will be stored along with the other settings. 312 But be aware that when &kdiff3; then terminates the changed value will be stored along with the other settings.
315 With <option>--confighelp</option> you can find out the names of the available items and current values.</para> 313 With <option>--confighelp</option> you can find out the names of the available items and current values.</para>
316 <para>Via <option>--config</option> you can specify a different config file. When you often use KDiff3 314 <para>Via <option>--config</option> you can specify a different config file. When you often use &kdiff3;
317 with completely different setups this allows you to easily switch between them.</para> 315 with completely different setups this allows you to easily switch between them.</para>
318 </sect2> 316 </sect2>
319 <sect2><title>Ignorable command line options</title> 317 <sect2><title>Ignorable command line options</title>
320 <para>Many people want to use KDiff3 with some version control system. 318 <para>Many people want to use &kdiff3; with some version control system.
321 But when that version control system calls KDiff3 using command line parameters that KDiff3 doesn't recognise, then KDiff3 terminates with an error. 319 But when that version control system calls &kdiff3; using command line parameters that &kdiff3; doesn't recognise, then &kdiff3; terminates with an error.
322 The integration settings allow to specify command line parameters that should be ignored by KDiff3. 320 The integration settings allow to specify command line parameters that should be ignored by &kdiff3;.
323 They will appear in the usage help like in this example:</para> 321 They will appear in the usage help like in this example:</para>
324 <screen> 322 <screen>
325 --<replaceable>foo</replaceable> Ignored. (User defined.) 323 --<replaceable>foo</replaceable> Ignored. (User defined.)
326 </screen> 324 </screen>
327 <variablelist> 325 <variablelist>
328 <varlistentry><term><emphasis>Command line options to ignore:</emphasis></term><listitem><para> 326 <varlistentry><term><emphasis>Command line options to ignore:</emphasis></term><listitem><para>
329 A list of options, separated via semicolon ';'. When one of these options appears on the commandline, 327 A list of options, separated via semicolon ';'. When one of these options appears on the commandline,
330 then KDiff3 will ignore it and run without reporting an error. 328 then &kdiff3; will ignore it and run without reporting an error.
331 (Default is "u;query;html;abort").</para></listitem></varlistentry> 329 (Default is "u;query;html;abort").</para></listitem></varlistentry>
332 </variablelist> 330 </variablelist>
333 <para>When this isn't enough, then it is recommended to write a shell script that does the option translation.</para> 331 <para>When this isn't enough, then it is recommended to write a shell script that does the option translation.</para>
334 </sect2> 332 </sect2>
335 333
350 entry for "C" remains empty, then only a two file diff analysis will be 348 entry for "C" remains empty, then only a two file diff analysis will be
351 done. 349 done.
352 </para><para> 350 </para><para>
353 You can also select a directory via "Dir...". If for A a directory is specified 351 You can also select a directory via "Dir...". If for A a directory is specified
354 then a directory-comparison/merge starts. If A specifies a file but B, C or 352 then a directory-comparison/merge starts. If A specifies a file but B, C or
355 the output specify a directory, then KDiff3 uses the filename from A in the 353 the output specify a directory, then &kdiff3; uses the filename from A in the
356 specified directories. 354 specified directories.
357 </para><para> 355 </para><para>
358 If "Merge" is selected, then the "Output"-line becomes editable. But it 356 If "Merge" is selected, then the "Output"-line becomes editable. But it
359 is not required to specify the output filename immediately. You can also 357 is not required to specify the output filename immediately. You can also
360 postpone this until saving. 358 postpone this until saving.
364 </para> 362 </para>
365 </sect1> 363 </sect1>
366 364
367 <sect1 id="pasteinput"><title>Paste and Drop Input</title> 365 <sect1 id="pasteinput"><title>Paste and Drop Input</title>
368 <para> 366 <para>
369 Sometimes you want to compare parts of a text that is not an own file. KDiff3 also 367 Sometimes you want to compare parts of a text that is not an own file. &kdiff3; also
370 allows you to paste text from the clipboard into the diff input window that has the focus. 368 allows you to paste text from the clipboard into the diff input window that has the focus.
371 The diff analysis happens immediately then. 369 The diff analysis happens immediately then.
372 In the open dialog you need not specify files then, but just close it via "Cancel". 370 In the open dialog you need not specify files then, but just close it via "Cancel".
373 </para><para> 371 </para><para>
374 You can also use drag and drop: Drag a file from a file manager 372 You can also use drag and drop: Drag a file from a file manager
376 </para><para> 374 </para><para>
377 What's the idea? Sometimes a file contains two similar functions, but checking how similar 375 What's the idea? Sometimes a file contains two similar functions, but checking how similar
378 they really are is a big effort if you first must create two files and then load them. Now 376 they really are is a big effort if you first must create two files and then load them. Now
379 you can simply copy, paste and compare the relevant sections. 377 you can simply copy, paste and compare the relevant sections.
380 </para><para> 378 </para><para>
381 Note: Currently you can't drag anything from KDiff3. Only dropping in the diff input 379 Note: Currently you cannot drag anything from &kdiff3;. Only dropping in the diff input
382 is supported. 380 is supported.
383 </para><para> 381 </para><para>
384 Warning: Some editors still interpret the drag and drop into another program like cut 382 Warning: Some editors still interpret the drag and drop into another program like cut
385 (instead of copy) and paste. Your original data might be lost then. 383 (instead of copy) and paste. Your original data might be lost then.
386 </para> 384 </para>
433 lost here. By clicking into this overview column the corresponding text 431 lost here. By clicking into this overview column the corresponding text
434 will be shown. 432 will be shown.
435 </para></sect2><sect2 id="manualdiffhelp"><title>Manually Aligning Lines</title><para> 433 </para></sect2><sect2 id="manualdiffhelp"><title>Manually Aligning Lines</title><para>
436 Sometimes the algorithm places the wrong lines next to each other. Or you want to compare 434 Sometimes the algorithm places the wrong lines next to each other. Or you want to compare
437 one piece of text with text at a completely different position in the other file. 435 one piece of text with text at a completely different position in the other file.
438 For these situations you can manually instruct KDiff3 to align certain lines. 436 For these situations you can manually instruct &kdiff3; to align certain lines.
439 Mark the text for which you want to improve the alignment with the mouse as you would 437 Mark the text for which you want to improve the alignment with the mouse as you would
440 for copy and paste in the first diff view and then choose "Add Manual Diff Alignment" 438 for copy and paste in the first diff view and then choose "Add Manual Diff Alignment"
441 in the "Diffview"-menu (keyboard shortcut "Ctrl-Y") . An orange bar will appear in 439 in the "Diffview"-menu (keyboard shortcut "Ctrl-Y") . An orange bar will appear in
442 the summary column next to the chosen text. Repeat this for the second and 440 the summary column next to the chosen text. Repeat this for the second and
443 (if available) third diff view. KDiff3 will immediately recalculate the differences everytime you do this. 441 (if available) third diff view. &kdiff3; will immediately recalculate the differences everytime you do this.
444 and will align the chosen lines. Of course some of the previously matching lines in between 442 and will align the chosen lines. Of course some of the previously matching lines in between
445 might not match anymore. 443 might not match anymore.
446 </para><para> 444 </para><para>
447 Currently merging doesn't support the use of manual diff help. 445 Currently merging doesn't support the use of manual diff help.
448 </para></sect2> 446 </para></sect2>
486 window then the beginning of the group belonging to that line will shown in all windows. 484 window then the beginning of the group belonging to that line will shown in all windows.
487 This group then becomes the "current group". It is highlighted with the 485 This group then becomes the "current group". It is highlighted with the
488 "Current range (diff) background color" and 486 "Current range (diff) background color" and
489 a black bar appears on the left side of the text. 487 a black bar appears on the left side of the text.
490 </para></sect2><sect2><title>Choosing Inputs A, B or C For Current Conflict And Editing</title><para> 488 </para></sect2><sect2><title>Choosing Inputs A, B or C For Current Conflict And Editing</title><para>
491 The button bar below the menu bar contains three input selector buttons 489 The button bar below the menubar contains three input selector buttons
492 containing the letters "A", "B" and "C". Click the input selector 490 containing the letters "A", "B" and "C". Click the input selector
493 button to insert (or remove if already inserted) the lines from the respective source. 491 button to insert (or remove if already inserted) the lines from the respective source.
494 To choose the lines from several inputs click the respective buttons in the 492 To choose the lines from several inputs click the respective buttons in the
495 needed order. For example if you want that the lines from "B" appear before 493 needed order. For example if you want that the lines from "B" appear before
496 the lines from "A" in the output, first click "B", then "A". 494 the lines from "A" in the output, first click "B", then "A".
497 </para><para> 495 </para><para>
498 If you use the auto-advance option 496 If you use the auto-advance option
499 (<link linkend="autoadvance">"Automatically go to next unsolved conflict after source selection"</link>), 497 (<link linkend="autoadvance">"Automatically go to next unsolved conflict after source selection"</link>),
500 you should disable this before choosing lines from several inputs or if you want to 498 you should disable this before choosing lines from several inputs or if you want to
501 edit the lines after your choice. Otherwise KDiff3 will jump to the next 499 edit the lines after your choice. Otherwise &kdiff3; will jump to the next
502 conflict after choosing the first input. 500 conflict after choosing the first input.
503 </para><para> 501 </para><para>
504 It is often helpful directly edit the merge output. 502 It is often helpful directly edit the merge output.
505 The summary column will show "m" for every line that was manually modified. 503 The summary column will show "m" for every line that was manually modified.
506 When for instance the differences are aligned in a way that simply choosing 504 When for instance the differences are aligned in a way that simply choosing
519 </para></sect2><sect2><title>Choosing Input A, B, or C for All Conflicts</title><para> 517 </para></sect2><sect2><title>Choosing Input A, B, or C for All Conflicts</title><para>
520 The normal merge will start by solving simple conflicts automatically. 518 The normal merge will start by solving simple conflicts automatically.
521 But the "Merge"-menu provides some actions for other common needs. 519 But the "Merge"-menu provides some actions for other common needs.
522 If you have to select the same source for most conflicts, then you can 520 If you have to select the same source for most conflicts, then you can
523 choose "A", "B" or "C" everywhere, or only for the remaining unsolved 521 choose "A", "B" or "C" everywhere, or only for the remaining unsolved
524 conflicts, or for unsolved whitespace conflicts. If you want to decide every 522 conflicts, or for unsolved white space conflicts. If you want to decide every
525 single delta yourself, you can "Set deltas to conflicts". Or if you want to 523 single delta yourself, you can "Set deltas to conflicts". Or if you want to
526 return to the automatic choices of KDiff3 then select 524 return to the automatic choices of &kdiff3; then select
527 "Automatically solve simple conflicts". KDiff3 then restarts the merge. 525 "Automatically solve simple conflicts". &kdiff3; then restarts the merge.
528 For actions that change your previous modifications KDiff3 will ask for your 526 For actions that change your previous modifications &kdiff3; will ask for your
529 confirmation before proceeding. 527 confirmation before proceeding.
530 </para><para> 528 </para><para>
531 Note: When choosing either source for unsolved whitespace conflicts and 529 Note: When choosing either source for unsolved white space conflicts and
532 the options "Ignore Numbers" or "Ignore C/C++ Comments" are used then changes in 530 the options "Ignore Numbers" or "Ignore C/C++ Comments" are used then changes in
533 numbers or comments will be treated like whitespace too. 531 numbers or comments will be treated like white space too.
534 532
535 </para></sect2><sect2 id="vcskeywordsmergesupport"><title>Automatic Merge of Version Control Keywords and History (Log)</title><para> 533 </para></sect2><sect2 id="vcskeywordsmergesupport"><title>Automatic Merge of Version Control Keywords and History (Log)</title><para>
536 Many version control systems support special keywords in the file. (e.g. "$Date$", 534 Many version control systems support special keywords in the file. (e.g. "&#36;Date&#36;",
537 "$Header$", "$Author$", "$Log$ 535 "&#36;Header&#36;", "&#36;Author&#36;", "&#36;Log&#36;" etc.) During the
538 "$Header$", "$Author$", "Revision 1.5 2006/04/10 08:33:34 joachim99
539 "$Header$", "$Author$", "KDiff3 0.9.89
540 "$Header$", "$Author$", "" etc.) During the
541 check-in the version control system (VCS) changes these lines. For instance 536 check-in the version control system (VCS) changes these lines. For instance
542 "$Date$" will turn into "$Date$". Since this line will 537 "&#36;Date&#36;" will turn into "&#36;Date: 2005/03/22 18:45:01 &#36;". Since this line will
543 be different in every version of the file, it would require manual interaction 538 be different in every version of the file, it would require manual interaction
544 during the merge. 539 during the merge.
545 </para><para> 540 </para><para>
546 KDiff3 offers automatic merge for these items. For simple lines that match the 541 &kdiff3; offers automatic merge for these items. For simple lines that match the
547 "Auto merge regular expression"-option in all input-files KDiff3 will choose 542 "Auto merge regular expression"-option in all input-files &kdiff3; will choose
548 the line from B or - if available - from C. (Additionally it is necessary that the lines 543 the line from B or - if available - from C. (Additionally it is necessary that the lines
549 in question line up in the comparison and the previous line contains no conflict.) 544 in question line up in the comparison and the previous line contains no conflict.)
550 This auto merge can either be run immediately after a merge starts (activate the option 545 This auto merge can either be run immediately after a merge starts (activate the option
551 "Run regular expression auto merge on merge start") or later via the merge 546 "Run regular expression auto merge on merge start") or later via the merge
552 menu "Run Regular Expression Auto Merge". 547 menu "Run Regular Expression Auto Merge".
554 Automatic merge for version control history (also called "log") is also supported. 549 Automatic merge for version control history (also called "log") is also supported.
555 The history automerge can either run immediately when the merge starts by activating the 550 The history automerge can either run immediately when the merge starts by activating the
556 option "Merge version control history on merge start" or later via the merge menu 551 option "Merge version control history on merge start" or later via the merge menu
557 "Automatically Solve History Conflicts". 552 "Automatically Solve History Conflicts".
558 </para><para> 553 </para><para>
559 Usually the version control history begins with a line containing the keyword "$Log$ 554 Usually the version control history begins with a line containing the keyword "&#36;Log&#36;".
560 Usually the version control history begins with a line containing the keyword "Revision 1.5 2006/04/10 08:33:34 joachim99
561 Usually the version control history begins with a line containing the keyword "KDiff3 0.9.89
562 Usually the version control history begins with a line containing the keyword "".
563 This must be matched by the "History start regular expression"-option. 555 This must be matched by the "History start regular expression"-option.
564 KDiff3 detects which subsequent lines are in the history by analysing the leading characters 556 &kdiff3; detects which subsequent lines are in the history by analysing the leading characters
565 that came before the "$Log$ 557 that came before the "&#36;Log&#36;"-keyword. If the same "leading comment" also appears in the following
566 that came before the "Revision 1.5 2006/04/10 08:33:34 joachim99
567 that came before the "KDiff3 0.9.89
568 that came before the ""-keyword. If the same "leading comment" also appears in the following
569 lines, then they are also included in the history. 558 lines, then they are also included in the history.
570 </para><para> 559 </para><para>
571 During each check-in the VCS writes a unique line specifying version-, date- and time-information 560 During each check-in the VCS writes a unique line specifying version-, date- and time-information
572 followed by lines with user comments. 561 followed by lines with user comments.
573 These lines form one history-entry. This history section grows with every check-in and the 562 These lines form one history-entry. This history section grows with every check-in and the
574 most recent entries appear at the top (after the history start line). 563 most recent entries appear at the top (after the history start line).
575 </para><para> 564 </para><para>
576 When for parallel development two or more developers check-in a branch of the file then 565 When for parallel development two or more developers check-in a branch of the file then
577 the merge history will contain several entries that appear as conflicts during the merge 566 the merge history will contain several entries that appear as conflicts during the merge
578 of the branches. Since merging these can become very tedious, KDiff3 offers support with two 567 of the branches. Since merging these can become very tedious, &kdiff3; offers support with two
579 possible strategies: Just insert the history information from both contributors at the top 568 possible strategies: Just insert the history information from both contributors at the top
580 or sort the history information by a user defined key. 569 or sort the history information by a user defined key.
581 </para><para> 570 </para><para>
582 The just-insert-all-entries-method is easier to configure. KDiff3 just needs a method to 571 The just-insert-all-entries-method is easier to configure. &kdiff3; just needs a method to
583 detect, which lines belong to one history entry. Most VCS insert an empty line after each 572 detect, which lines belong to one history entry. Most VCS insert an empty line after each
584 history entry. If there are no other empty lines, this is a sufficient criterion for KDiff3. 573 history entry. If there are no other empty lines, this is a sufficient criterion for &kdiff3;.
585 Just set an empty "History entry start regular expression". If the empty line criterion 574 Just set an empty "History entry start regular expression". If the empty line criterion
586 isn't sufficient, you can specify a regular expression to detect the history entry start. 575 isn't sufficient, you can specify a regular expression to detect the history entry start.
587 </para><para> 576 </para><para>
588 Note that KDiff3 will remove duplicate history entrys. If a history entry appeared several times 577 Note that &kdiff3; will remove duplicate history entrys. If a history entry appeared several times
589 in the history of a input file, only one entry will remain in the output. 578 in the history of a input file, only one entry will remain in the output.
590 </para><para> 579 </para><para>
591 If you want to sort the history, then you have to specify how the sort key should be built. 580 If you want to sort the history, then you have to specify how the sort key should be built.
592 Use parentheses in the "History entry start regular expression" to group parts of the regular 581 Use parentheses in the "History entry start regular expression" to group parts of the regular
593 expression that should later be used for the sort key. 582 expression that should later be used for the sort key.
598 the regular expressions and key-generation in a dedicated dialog by pressing the 587 the regular expressions and key-generation in a dedicated dialog by pressing the
599 "Test your regular expressions"-button. 588 "Test your regular expressions"-button.
600 </para><para>Example: Assume a history that looks like this: 589 </para><para>Example: Assume a history that looks like this:
601 <screen> 590 <screen>
602 /************************************************************************** 591 /**************************************************************************
603 ** HISTORY: $Log$ 592 ** HISTORY: &#36;Log: \toms_merge_main_view\MyApplication\src\complexalgorithm.cpp &#36;
604 ** HISTORY: Revision 1.5 2006/04/10 08:33:34 joachim99
605 ** HISTORY: KDiff3 0.9.89
606 ** HISTORY:
607 ** 593 **
608 ** \main\integration_branch_12 2 Apr 2001 10:45:41 tom 594 ** \main\integration_branch_12 2 Apr 2001 10:45:41 tom
609 ** Merged branch simon_branch_15. 595 ** Merged branch simon_branch_15.
610 ** 596 **
611 ** \main\henry_bugfix_branch_7\1 30 Mar 2001 19:22:05 henry 597 ** \main\henry_bugfix_branch_7\1 30 Mar 2001 19:22:05 henry
612 ** Improved the speed for subroutine convertToMesh(). 598 ** Improved the speed for subroutine convertToMesh().
613 ** Fixed crash. 599 ** Fixed crash.
614 **************************************************************************/ 600 **************************************************************************/
615 </screen> 601 </screen>
616 The history start line matches the regular expression ".*\$Log.*\$.*". Then follow 602 The history start line matches the regular expression ".*\&#36;Log.*\&#36;.*". Then follow
617 the history entries. 603 the history entries.
618 </para><para> 604 </para><para>
619 The line with the "$Log$ 605 The line with the "&#36;Log&#36;"-keyword begins with two "*" after which follows a space.
620 The line with the "Revision 1.5 2006/04/10 08:33:34 joachim99 606 &kdiff3; uses the first non-white-space string as "leading comment" and assumes that
621 The line with the "KDiff3 0.9.89
622 The line with the ""-keyword begins with two "*" after which follows a space.
623 KDiff3 uses the first non-white-space string as "leading comment" and assumes that
624 the history ends in the first line without this leading comment. In this example the 607 the history ends in the first line without this leading comment. In this example the
625 last line ends with a string that also starts with two "*", but instead of a space 608 last line ends with a string that also starts with two "*", but instead of a space
626 character more "*" follow. Hence this line ends the history. 609 character more "*" follow. Hence this line ends the history.
627 </para><para> 610 </para><para>
628 If history sorting isn't required then the history entry start line regular expression 611 If history sorting isn't required then the history entry start line regular expression
633 </screen> 616 </screen>
634 For details about regular expressions please see the 617 For details about regular expressions please see the
635 <ulink url="http://doc.trolltech.com/3.3/qregexp.html#details">regular expression documentation by Trolltech</ulink>. 618 <ulink url="http://doc.trolltech.com/3.3/qregexp.html#details">regular expression documentation by Trolltech</ulink>.
636 Note that "\s" (with lowercase "s") matches any white space and "\S" (with uppercase "S") matches any non-white-space. 619 Note that "\s" (with lowercase "s") matches any white space and "\S" (with uppercase "S") matches any non-white-space.
637 In our example the history entry start contains first the version info with reg. exp. "\\main\\\S+", the date consisting of day "[0-9]+", month "(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)" and year "[0-9][0-9][0-9][0-9]", the time "[0-9][0-9]:[0-9][0-9]:[0-9][0-9]" and finally the developers login name ".*". 620 In our example the history entry start contains first the version info with reg. exp. "\\main\\\S+", the date consisting of day "[0-9]+", month "(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)" and year "[0-9][0-9][0-9][0-9]", the time "[0-9][0-9]:[0-9][0-9]:[0-9][0-9]" and finally the developers login name ".*".
638 Note that the leading comment (in the example "**") will already be removed by KDiff3 621 Note that the leading comment (in the example "**") will already be removed by &kdiff3;
639 before trying to match, hence the regular expression begins with a match for none or more white-space characters "\s*". 622 before trying to match, hence the regular expression begins with a match for none or more white-space characters "\s*".
640 </para><para> 623 </para><para>
641 If you require a sorted history. Then the sortkey must be calculated. For this the 624 If you require a sorted history. Then the sortkey must be calculated. For this the
642 relevant parts in the regular expression must be grouped by parentheses. 625 relevant parts in the regular expression must be grouped by parentheses.
643 (The extra parentheses can also stay in if history sorting is disabled.) 626 (The extra parentheses can also stay in if history sorting is disabled.)
647 </screen> 630 </screen>
648 The parentheses now contain 1. version info, 2. day, 3. month, 4. year, 5. time, 6. name. 631 The parentheses now contain 1. version info, 2. day, 3. month, 4. year, 5. time, 6. name.
649 But if we want to sort by date and time, we need to construct a key with the elements in a different order of appearance: 632 But if we want to sort by date and time, we need to construct a key with the elements in a different order of appearance:
650 First the year, followed by month, day, time, version info and name. Hence the sortkey order to specify is "4,3,2,5,1,6". 633 First the year, followed by month, day, time, version info and name. Hence the sortkey order to specify is "4,3,2,5,1,6".
651 </para><para> 634 </para><para>
652 Because month names aren't good for sorting ("Apr" would be first) KDiff3 detects in which order 635 Because month names aren't good for sorting ("Apr" would be first) &kdiff3; detects in which order
653 the month names were given and uses that number instead ("Apr"->"04"). 636 the month names were given and uses that number instead ("Apr"->"04").
654 And if a pure number is found it will be transformed to a 4-digit value with leading zeros for sorting. 637 And if a pure number is found it will be transformed to a 4-digit value with leading zeros for sorting.
655 Finally the resulting sort key for the first history entry start line will be: 638 Finally the resulting sort key for the first history entry start line will be:
656 <screen> 639 <screen>
657 2001 04 0002 10:45:41 integration_branch_12 tom 640 2001 04 0002 10:45:41 integration_branch_12 tom
682 in section <link linkend="synchronise_views">"Setting The Current Group And Synchronising Merge And Diff View Position"</link>). 665 in section <link linkend="synchronise_views">"Setting The Current Group And Synchronising Merge And Diff View Position"</link>).
683 </para><para> 666 </para><para>
684 The button bar also contains nine navigation buttons with which you can 667 The button bar also contains nine navigation buttons with which you can
685 jump to the current/first/last difference, to the next/previous difference 668 jump to the current/first/last difference, to the next/previous difference
686 (ctrl-down/ctrl-up), to the next/previous conflict (ctrl-pgdown/ctrl-pgup), 669 (ctrl-down/ctrl-up), to the next/previous conflict (ctrl-pgdown/ctrl-pgup),
687 or to the next/previous unsolved conflict. Note that for KDiff3 a "conflict" 670 or to the next/previous unsolved conflict. Note that for &kdiff3; a "conflict"
688 that was not automatically solved at the start of the merge stays a "conflict" 671 that was not automatically solved at the start of the merge stays a "conflict"
689 even if it is solved. Hence the necessity to distinguish "unsolved conflicts". 672 even if it is solved. Hence the necessity to distinguish "unsolved conflicts".
690 </para> 673 </para>
691 <sect2 id="autoadvance"><title>Auto-Advance</title> 674 <sect2 id="autoadvance"><title>Auto-Advance</title>
692 <para> 675 <para>
693 There also is a button "Automatically go to next unsolved conflict after 676 There also is a button "Automatically go to next unsolved conflict after
694 source selection" (Auto-Advance). If you enable this, then, when one source 677 source selection" (Auto-Advance). If you enable this, then, when one source
695 is selected, KDiff3 will jump to and select the next unsolved conflict 678 is selected, &kdiff3; will jump to and select the next unsolved conflict
696 automatically. This can help when you always want to choose one source only. 679 automatically. This can help when you always want to choose one source only.
697 When you need both sources, or you want to edit after selecting, then you 680 When you need both sources, or you want to edit after selecting, then you
698 probably want to switch this off. Before proceeding to the next unsolved conflict 681 probably want to switch this off. Before proceeding to the next unsolved conflict
699 KDiff3 shows you the effect of your choice for a short time. This delay is 682 &kdiff3; shows you the effect of your choice for a short time. This delay is
700 adjustable in the Diff- &amp; Merge-Settings: You can 683 adjustable in the Diff- &amp; Merge-Settings: You can
701 specify the "Auto-Advance delay" in milli seconds between 0 and 2000. Hint: 684 specify the "Auto-Advance delay" in milli seconds between 0 and 2000. Hint:
702 Tired of many clicks? - Use a small Auto-Advance-delay and the shortcuts 685 Tired of many clicks? - Use a small Auto-Advance-delay and the shortcuts
703 Ctrl-1/2/3 to select A/B/C for many conflicts. 686 Ctrl-1/2/3 to select A/B/C for many conflicts.
704 </para> 687 </para>
713 button again. You can also select a word by double clicking it. In the merge 696 button again. You can also select a word by double clicking it. In the merge
714 output editor you can also select via the keyboard by holding the "shift"-button 697 output editor you can also select via the keyboard by holding the "shift"-button
715 and navigation with the cursor keys. 698 and navigation with the cursor keys.
716 </para><para> 699 </para><para>
717 If the selection exceeds the visible range you can move the mouse over the 700 If the selection exceeds the visible range you can move the mouse over the
718 window borders which causes KDiff3 to scroll in that direction. 701 window borders which causes &kdiff3; to scroll in that direction.
719 </para><para> 702 </para><para>
720 For very large selections you can also use the navigation keys while holding down 703 For very large selections you can also use the navigation keys while holding down
721 the mouse. E.g. use page up and page down to quickly go to a certain position. At the 704 the mouse. E.g. use page up and page down to quickly go to a certain position. At the
722 end position release the mouse button. 705 end position release the mouse button.
723 </para><para> 706 </para><para>
745 <para> 728 <para>
746 Saving will only be allowed, when all conflicts were solved. If the file 729 Saving will only be allowed, when all conflicts were solved. If the file
747 already exists and the "Backup files"-option is enabled then the existing 730 already exists and the "Backup files"-option is enabled then the existing
748 file will be renamed with an ".orig"-extension, but if such a file exists 731 file will be renamed with an ".orig"-extension, but if such a file exists
749 it will be deleted. When you exit or start another diff-analysis and data 732 it will be deleted. When you exit or start another diff-analysis and data
750 wasn't saved yet, then KDiff3 will ask if you want to save, cancel or proceed 733 wasn't saved yet, then &kdiff3; will ask if you want to save, cancel or proceed
751 without saving. (KDiff3 does not catch any signals. So if you "kill" KDiff3 734 without saving. (&kdiff3; does not catch any signals. So if you "kill" &kdiff3;
752 then your data will be lost.) 735 then your data will be lost.)
753 </para><para> 736 </para><para>
754 Line endings are saved according to the normal method on the underlying 737 Line endings are saved according to the normal method on the underlying
755 operating system. For Unices each line ends with an linefeed-character "\n", 738 operating system. For Unices each line ends with an linefeed-character "\n",
756 while for Win32-based systems each line ends with a carriage-return + a linefeed 739 while for Win32-based systems each line ends with a carriage-return + a linefeed
757 "\r\n". KDiff3 does not preserve the line-endings of the input files, which 740 "\r\n". &kdiff3; does not preserve the line-endings of the input files, which
758 also means that you shouldn't use KDiff3 with binary files. 741 also means that you shouldn't use &kdiff3; with binary files.
759 </para> 742 </para>
760 </sect1> 743 </sect1>
761 744
762 <sect1 id="find"><title>Finding Strings</title> 745 <sect1 id="find"><title>Finding Strings</title>
763 <para> 746 <para>
764 You can search for a string in any text-window of KDiff3. The "Find ..."-command 747 You can search for a string in any text-window of &kdiff3;. The "Find ..."-command
765 (Ctrl-F) in the Edit-menu opens a dialog that lets you specify the string 748 (Ctrl-F) in the Edit-menu opens a dialog that lets you specify the string
766 to search for. You can also select the windows which should be searched. 749 to search for. You can also select the windows which should be searched.
767 Searching will always start at the top. Use the "Find Next"-command (F3) 750 Searching will always start at the top. Use the "Find Next"-command (F3)
768 to proceed to the next occurrence. If you select to search several windows then the first 751 to proceed to the next occurrence. If you select to search several windows then the first
769 window will be searched from top to bottom before the search starts in the next 752 window will be searched from top to bottom before the search starts in the next
771 </para> 754 </para>
772 </sect1> 755 </sect1>
773 756
774 <sect1 id="printing"><title>Printing</title> 757 <sect1 id="printing"><title>Printing</title>
775 <para> 758 <para>
776 KDiff3 supports printing for textfile differences. The "Print..."-command (Ctrl-P) 759 &kdiff3; supports printing for textfile differences. The "Print..."-command (Ctrl-P)
777 in the File-menu opens a dialog that allows you to select the printer and to adjust 760 in the File-menu opens a dialog that allows you to select the printer and to adjust
778 other options. 761 other options.
779 </para><para> 762 </para><para>
780 There are several possibilities to adjust the range. Due to different printing 763 There are several possibilities to adjust the range. Due to different printing
781 dialogs on different operating systems, the method to achieve certain range selections varies. 764 dialogs on different operating systems, the method to achieve certain range selections varies.
808 </sect1> 791 </sect1>
809 792
810 <sect1 id="options"><title>Options</title> 793 <sect1 id="options"><title>Options</title>
811 <para> 794 <para>
812 Options and the recent-file-list will be saved when you exit the program, 795 Options and the recent-file-list will be saved when you exit the program,
813 and reloaded when you start it. (Menu Settings->Configure KDiff3 ...) 796 and reloaded when you start it. (Menu Settings->Configure &kdiff3; ...)
814 </para> 797 </para>
815 <sect2><title>Font</title> 798 <sect2><title>Font</title>
816 <para> 799 <para>
817 Select a fixed width font. (On some systems this dialog will also 800 Select a fixed width font. (On some systems this dialog will also
818 present variable width fonts, but you should not use them.) 801 present variable width fonts, but you should not use them.)
866 </variablelist> 849 </variablelist>
867 </sect2> 850 </sect2>
868 851
869 <sect2 id="diffmergeoptions"><title>Diff and Merge Settings</title> 852 <sect2 id="diffmergeoptions"><title>Diff and Merge Settings</title>
870 <para> 853 <para>
871 When comparing files, KDiff3 first it tries to match lines that are equal 854 When comparing files, &kdiff3; first it tries to match lines that are equal
872 in all input files. Only during this step it might ignore white space. The 855 in all input files. Only during this step it might ignore white space. The
873 second step compares each line. In this step white space will not be ignored. 856 second step compares each line. In this step white space will not be ignored.
874 Also during the merge white space will not be ignored. 857 Also during the merge white space will not be ignored.
875 </para> 858 </para>
876 859
877 <variablelist> 860 <variablelist>
878 <varlistentry><term><emphasis>Preserve Carriage Return:</emphasis></term><listitem><para> Some editors (on some systems) save 861 <varlistentry><term><emphasis>Preserve Carriage Return:</emphasis></term><listitem><para> Some editors (on some systems) save
879 carriage return '\r' and linefeed '\n'-characters at the end of line, while 862 carriage return '\r' and linefeed '\n'-characters at the end of line, while
880 others will only save the linefeed '\n'. Usually KDiff3 ignores the carriage 863 others will only save the linefeed '\n'. Usually &kdiff3; ignores the carriage
881 return, but then files that don't have equal sizes, look equal in side by 864 return, but then files that don't have equal sizes, look equal in side by
882 side comparison. When this option is on, then the carriage return characters 865 side comparison. When this option is on, then the carriage return characters
883 are made visible but are treated as white space. This option must be off 866 are made visible but are treated as white space. This option must be off
884 during a merge. Default is off.</para></listitem></varlistentry> 867 during a merge. Default is off.</para></listitem></varlistentry>
885 <varlistentry><term><emphasis>Ignore numbers:</emphasis></term><listitem><para> Default is off. Number characters ('0'-'9', '.', '-') 868 <varlistentry><term><emphasis>Ignore numbers:</emphasis></term><listitem><para> Default is off. Number characters ('0'-'9', '.', '-')
907 how long to show the result of the selection before jumping to the next unsolved 890 how long to show the result of the selection before jumping to the next unsolved
908 conflict. 891 conflict.
909 </para></listitem></varlistentry> 892 </para></listitem></varlistentry>
910 <varlistentry><term><emphasis>White space 2/3-file merge default:</emphasis></term><listitem><para> 893 <varlistentry><term><emphasis>White space 2/3-file merge default:</emphasis></term><listitem><para>
911 Automatically solve all white-space conflict by choosing the specified file. 894 Automatically solve all white-space conflict by choosing the specified file.
912 (Default is manual choice.) Useful if white-space really isn't important in many files. 895 (Default is manual choice.) Useful if white space really isn't important in many files.
913 If you need this only occasionally better use "Choose A/B/C For All Unsolved Whitespace Conflicts" 896 If you need this only occasionally better use "Choose A/B/C For All Unsolved Whitespace Conflicts"
914 in the merge menu. Note that if you enable either "Ignore numbers" or "Ignore C/C++ comments" 897 in the merge menu. Note that if you enable either "Ignore numbers" or "Ignore C/C++ comments"
915 then this auto-choice also applies for conflicts in numbers or comments. 898 then this auto-choice also applies for conflicts in numbers or comments.
916 </para></listitem></varlistentry> 899 </para></listitem></varlistentry>
917 <varlistentry><term><emphasis>Auto merge regular expression:</emphasis></term><listitem><para> 900 <varlistentry><term><emphasis>Auto merge regular expression:</emphasis></term><listitem><para>
918 Regular expression for lines where KDiff3 should automatically choose one source. See also <link linkend="vcskeywordsmergesupport">Automatic Merge ...</link> 901 Regular expression for lines where &kdiff3; should automatically choose one source. See also <link linkend="vcskeywordsmergesupport">Automatic Merge ...</link>
919 </para></listitem></varlistentry> 902 </para></listitem></varlistentry>
920 <varlistentry><term><emphasis>Run regular expression auto merge on merge start:</emphasis></term><listitem><para> 903 <varlistentry><term><emphasis>Run regular expression auto merge on merge start:</emphasis></term><listitem><para>
921 If activated KDiff3 runs the automatic merge using the "Auto merge regular expression" when a merge is started. 904 If activated &kdiff3; runs the automatic merge using the "Auto merge regular expression" when a merge is started.
922 </para></listitem></varlistentry> 905 </para></listitem></varlistentry>
923 <varlistentry><term><emphasis>History start regular expression:</emphasis></term><listitem><para> 906 <varlistentry><term><emphasis>History start regular expression:</emphasis></term><listitem><para>
924 Regular expression for the start of the merge history entry. 907 Regular expression for the start of the merge history entry.
925 Usually this line contains the "$Log$ 908 Usually this line contains the "&#36;Log&#36;"-keyword.
926 Usually this line contains the "Revision 1.5 2006/04/10 08:33:34 joachim99 909 Default value: ".*\&#36;Log.*\&#36;.*"
927 Usually this line contains the "KDiff3 0.9.89
928 Usually this line contains the ""-keyword.
929 Default value: ".*\$Log.*\$.*"
930 </para></listitem></varlistentry> 910 </para></listitem></varlistentry>
931 <varlistentry><term><emphasis>History entry start regular expression:</emphasis></term><listitem><para> 911 <varlistentry><term><emphasis>History entry start regular expression:</emphasis></term><listitem><para>
932 A merge history entry consists of several lines. 912 A merge history entry consists of several lines.
933 Specify the regular expression to detect the first line (without the leading comment). 913 Specify the regular expression to detect the first line (without the leading comment).
934 Use parentheses to group the keys you want to use for sorting. 914 Use parentheses to group the keys you want to use for sorting.
935 If left empty, then KDiff3 assumes that empty lines separate history entries. 915 If left empty, then &kdiff3; assumes that empty lines separate history entries.
936 See also <link linkend="vcskeywordsmergesupport">Automatic Merge ...</link> 916 See also <link linkend="vcskeywordsmergesupport">Automatic Merge ...</link>
937 </para></listitem></varlistentry> 917 </para></listitem></varlistentry>
938 <varlistentry><term><emphasis>History merge sorting:</emphasis></term><listitem><para> 918 <varlistentry><term><emphasis>History merge sorting:</emphasis></term><listitem><para>
939 Enable version control history sorting. 919 Enable version control history sorting.
940 </para></listitem></varlistentry> 920 </para></listitem></varlistentry>
945 starting with 1) using ',' as separator (e.g. "4,5,6,1,2,3,7"). 925 starting with 1) using ',' as separator (e.g. "4,5,6,1,2,3,7").
946 If left empty, then no sorting will be done. 926 If left empty, then no sorting will be done.
947 See also <link linkend="vcskeywordsmergesupport">Automatic Merge ...</link> 927 See also <link linkend="vcskeywordsmergesupport">Automatic Merge ...</link>
948 </para></listitem></varlistentry> 928 </para></listitem></varlistentry>
949 <varlistentry><term><emphasis>Merge version control history on merge start:</emphasis></term><listitem><para> 929 <varlistentry><term><emphasis>Merge version control history on merge start:</emphasis></term><listitem><para>
950 If activated KDiff3 runs the automatic history merging using aforementioned options when a merge is started. 930 If activated &kdiff3; runs the automatic history merging using aforementioned options when a merge is started.
951 </para></listitem></varlistentry> 931 </para></listitem></varlistentry>
952 <varlistentry><term><emphasis>Test your regular expressions</emphasis></term><listitem><para> 932 <varlistentry><term><emphasis>Test your regular expressions</emphasis></term><listitem><para>
953 This button shows a dialog that allows you to improve and test the regular expressions above. 933 This button shows a dialog that allows you to improve and test the regular expressions above.
954 Just copy the respective data from your files into the example lines. The "Match results" 934 Just copy the respective data from your files into the example lines. The "Match results"
955 will immediately show whether the match succeeds or not. 935 will immediately show whether the match succeeds or not.
956 The "Sort key result" will display the key used for history merge sorting. 936 The "Sort key result" will display the key used for history merge sorting.
957 </para></listitem></varlistentry> 937 </para></listitem></varlistentry>
958 <varlistentry><term><emphasis>Irrelevant merge command:</emphasis></term><listitem><para> 938 <varlistentry><term><emphasis>Irrelevant merge command:</emphasis></term><listitem><para>
959 Specify a command of your own that should be called when KDiff3 detects 939 Specify a command of your own that should be called when &kdiff3; detects
960 that for a three file merge the file from B doesn't contribute any 940 that for a three file merge the file from B doesn't contribute any
961 relevant data that isn't already contained in the file from C. 941 relevant data that isn't already contained in the file from C.
962 The command is called with the three filenames as parameters. 942 The command is called with the three filenames as parameters.
963 Data matched by the "Auto merge regular expression" or in the 943 Data matched by the "Auto merge regular expression" or in the
964 history isn't considered relevant. 944 history isn't considered relevant.
984 </variablelist> 964 </variablelist>
985 </sect2> 965 </sect2>
986 966
987 <sect2><title>Regional and Language Options</title> 967 <sect2><title>Regional and Language Options</title>
988 <variablelist> 968 <variablelist>
989 <varlistentry><term><emphasis>Language:</emphasis></term><listitem><para>Adjust the language of the user interface. Changing this option doesn't affect the running program. You have to exit and restart KDiff3 so that the language is changed. (This option is not available in the KDE version of KDiff3 because the language is adjustable in the global KDE settings.) 969 <varlistentry><term><emphasis>Language:</emphasis></term><listitem><para>Adjust the language of the user interface. Changing this option doesn't affect the running program. You have to exit and restart &kdiff3; so that the language is changed. (This option is not available in the KDE version of &kdiff3; because the language is adjustable in the global KDE settings.)
990 </para></listitem></varlistentry> 970 </para></listitem></varlistentry>
991 <varlistentry><term><emphasis>Use the same encoding for everything:</emphasis></term><listitem><para> The following encoding options can be adjusted separately for each item or if this option is true, all values will take the first value. 971 <varlistentry><term><emphasis>Use the same encoding for everything:</emphasis></term><listitem><para> The following encoding options can be adjusted separately for each item or if this option is true, all values will take the first value.
992 </para></listitem></varlistentry> 972 </para></listitem></varlistentry>
993 <varlistentry><term><emphasis>Local Encoding:</emphasis></term><listitem><para>Above the codec-selectors appears a note that tells you what the local encoding is. (This is not adjustable but for your information just in case you don't know your local encoding, but need to select it.) 973 <varlistentry><term><emphasis>Local Encoding:</emphasis></term><listitem><para>Above the codec-selectors appears a note that tells you what the local encoding is. (This is not adjustable but for your information just in case you don't know your local encoding, but need to select it.)
994 </para></listitem></varlistentry> 974 </para></listitem></varlistentry>
996 </para></listitem></varlistentry> 976 </para></listitem></varlistentry>
997 <varlistentry><term><emphasis>File Encoding for Merge Output and Saving:</emphasis></term><listitem><para> When you have edited a file, then you can adjust which encoding will be used when saving to disk. 977 <varlistentry><term><emphasis>File Encoding for Merge Output and Saving:</emphasis></term><listitem><para> When you have edited a file, then you can adjust which encoding will be used when saving to disk.
998 </para></listitem></varlistentry> 978 </para></listitem></varlistentry>
999 <varlistentry><term><emphasis>File Encoding for Preprocessor Files:</emphasis></term><listitem><para>When you define preprocessors then they might not be able to operate on your codec. (e.g.: Your files are 16-bit-unicode and your preprocessor can only take 8-bit-ascii.) With this option you can define the encoding of preprocessor output. 979 <varlistentry><term><emphasis>File Encoding for Preprocessor Files:</emphasis></term><listitem><para>When you define preprocessors then they might not be able to operate on your codec. (e.g.: Your files are 16-bit-unicode and your preprocessor can only take 8-bit-ascii.) With this option you can define the encoding of preprocessor output.
1000 </para></listitem></varlistentry> 980 </para></listitem></varlistentry>
1001 <varlistentry><term><emphasis>Right To Left Language:</emphasis></term><listitem><para>Some languages are written right to left. When this option is enabled, KDiff3 draws the text from right to left in the diff input windows and in the merge output window. Note that if you start KDiff3 with the command line option "--reverse" then all layouting will be done right to left too. (This is a feature provided by Qt.) This documentation was written assuming that "Right To Left Language" or reverse layout are disabled. So some references to "left" or "right" must be replaced by their respective counterpart if you use these options. 981 <varlistentry><term><emphasis>Right To Left Language:</emphasis></term><listitem><para>Some languages are written right to left. When this option is enabled, &kdiff3; draws the text from right to left in the diff input windows and in the merge output window. Note that if you start &kdiff3; with the command line option "--reverse" then all layouting will be done right to left too. (This is a feature provided by Qt.) This documentation was written assuming that "Right To Left Language" or reverse layout are disabled. So some references to "left" or "right" must be replaced by their respective counterpart if you use these options.
1002 </para></listitem></varlistentry> 982 </para></listitem></varlistentry>
1003 983
1004 </variablelist> 984 </variablelist>
1005 </sect2> 985 </sect2>
1006 986
1050 </sect2> 1030 </sect2>
1051 </sect1> 1031 </sect1>
1052 1032
1053 <sect1 id="preprocessors"><title>Preprocessor Commands</title> 1033 <sect1 id="preprocessors"><title>Preprocessor Commands</title>
1054 <para> 1034 <para>
1055 KDiff3 supports two preprocessor options. 1035 &kdiff3; supports two preprocessor options.
1056 </para><para> 1036 </para><para>
1057 <variablelist> 1037 <variablelist>
1058 <varlistentry><term><emphasis>Preprocessor-Command:</emphasis></term><listitem><para> 1038 <varlistentry><term><emphasis>Preprocessor-Command:</emphasis></term><listitem><para>
1059 When any file is read, it will be piped through this external command. 1039 When any file is read, it will be piped through this external command.
1060 The output of this command will be visible instead of the original file. 1040 The output of this command will be visible instead of the original file.
1139 <para> 1119 <para>
1140 In this context only the <command>sed</command>-substitute-command is used: 1120 In this context only the <command>sed</command>-substitute-command is used:
1141 <screen> 1121 <screen>
1142 <command>sed</command> 's/<replaceable>REGEXP</replaceable>/<replaceable>REPLACEMENT</replaceable>/<replaceable>FLAGS</replaceable>' 1122 <command>sed</command> 's/<replaceable>REGEXP</replaceable>/<replaceable>REPLACEMENT</replaceable>/<replaceable>FLAGS</replaceable>'
1143 </screen> 1123 </screen>
1144 Before you use a new command within KDiff3, you should first test it in a console. 1124 Before you use a new command within &kdiff3;, you should first test it in a console.
1145 Here the <command>echo</command>-command is useful. Example: 1125 Here the <command>echo</command>-command is useful. Example:
1146 <screen> 1126 <screen>
1147 <command>echo</command> abrakadabra | <command>sed</command> 's/a/o/' 1127 <command>echo</command> abrakadabra | <command>sed</command> 's/a/o/'
1148 -> obrakadabra 1128 -> obrakadabra
1149 </screen> 1129 </screen>
1160 <screen> 1140 <screen>
1161 <command>cat</command> <replaceable>filename</replaceable> | <command>sed</command> <replaceable>options</replaceable> 1141 <command>cat</command> <replaceable>filename</replaceable> | <command>sed</command> <replaceable>options</replaceable>
1162 </screen> 1142 </screen>
1163 </para> 1143 </para>
1164 </sect2> 1144 </sect2>
1165 <sect2 id="sedforkdiff3"><title>Examples For <command>sed</command>-Use In KDiff3</title> 1145 <sect2 id="sedforkdiff3"><title>Examples For <command>sed</command>-Use In &kdiff3;</title>
1166 <sect3><title>Ignoring Other Types Of Comments</title> 1146 <sect3><title>Ignoring Other Types Of Comments</title>
1167 <para> 1147 <para>
1168 Currently KDiff3 understands only C/C++ comments. Using the 1148 Currently &kdiff3; understands only C/C++ comments. Using the
1169 Line-Matching-Preprocessor-Command you can also ignore 1149 Line-Matching-Preprocessor-Command you can also ignore
1170 other types of comments, by converting them into C/C++-comments. 1150 other types of comments, by converting them into C/C++-comments.
1171 1151
1172 Example: To ignore comments starting with "#", you would like to convert them 1152 Example: To ignore comments starting with "#", you would like to convert them
1173 to "//". Note that you also must enable the "Ignore C/C++-Comments" option to get 1153 to "//". Note that you also must enable the "Ignore C/C++-Comments" option to get
1297 <para> 1277 <para>
1298 The preprocessor-commands are often very useful, but as with any option that modifies 1278 The preprocessor-commands are often very useful, but as with any option that modifies
1299 your texts or hides away certain differences automatically, you might accidentally overlook 1279 your texts or hides away certain differences automatically, you might accidentally overlook
1300 certain differences and in the worst case destroy important data. 1280 certain differences and in the worst case destroy important data.
1301 </para><para> 1281 </para><para>
1302 For this reason during a merge if a normal preprocessor-command is being used KDiff3 1282 For this reason during a merge if a normal preprocessor-command is being used &kdiff3;
1303 will tell you so and ask you if it should be disabled or not. 1283 will tell you so and ask you if it should be disabled or not.
1304 But it won't warn you if a Line-Matching-Preprocessor-command is active. The merge will not complete until 1284 But it won't warn you if a Line-Matching-Preprocessor-command is active. The merge will not complete until
1305 all conflicts are solved. If you disabled "Show White Space" then the differences that 1285 all conflicts are solved. If you disabled "Show White Space" then the differences that
1306 were removed with the Line-Matching-Preprocessor-command will also be invisible. If the 1286 were removed with the Line-Matching-Preprocessor-command will also be invisible. If the
1307 Save-button remains disabled during a merge (because of remaining conflicts), make sure to enable 1287 Save-button remains disabled during a merge (because of remaining conflicts), make sure to enable
1308 "Show White Space". If you don't wan't to merge these less important differences manually 1288 "Show White Space". If you don't wan't to merge these less important differences manually
1309 you can select "Choose [A|B|C] For All Unsolved Whitespace Conflicts" in the Merge-menu. 1289 you can select "Choose [A|B|C] For All Unsolved White space Conflicts" in the Merge-menu.
1310 </para> 1290 </para>
1311 </sect2> 1291 </sect2>
1312 </sect1> 1292 </sect1>
1313 </chapter> 1293 </chapter>
1314 1294
1315 1295
1316 <chapter id="dirmerge"><title>Directory Comparison and Merge with KDiff3</title> 1296 <chapter id="dirmerge"><title>Directory Comparison and Merge with &kdiff3;</title>
1317 <sect1 id="dirmergeintro"><title>Introduction into Directory Comparison and Merge</title> 1297 <sect1 id="dirmergeintro"><title>Introduction into Directory Comparison and Merge</title>
1318 <para> 1298 <para>
1319 Often programmers must modify many files in a directory to achieve their 1299 Often programmers must modify many files in a directory to achieve their
1320 purpose. For this KDiff3 also lets you compare and merge complete directories 1300 purpose. For this &kdiff3; also lets you compare and merge complete directories
1321 recursively! 1301 recursively!
1322 </para><para> 1302 </para><para>
1323 Even though comparing and merging directories seems to be quite obvious, 1303 Even though comparing and merging directories seems to be quite obvious,
1324 there are several details that you should know about. Most important is of 1304 there are several details that you should know about. Most important is of
1325 course the fact that now many files might be affected by each operation. 1305 course the fact that now many files might be affected by each operation.
1326 If you don't have backups of your original data, then it can be very hard 1306 If you don't have backups of your original data, then it can be very hard
1327 or even impossible to return to the original state. So before starting a merge, 1307 or even impossible to return to the original state. So before starting a merge,
1328 make sure that your data is safe, and going back is possible. If you make 1308 make sure that your data is safe, and going back is possible. If you make
1329 an archive or use some version control system is your decision, but even 1309 an archive or use some version control system is your decision, but even
1330 experienced programmers and integrators need the old sources now and then. 1310 experienced programmers and integrators need the old sources now and then.
1331 And note that even though I (the author of KDiff3) try to do my best, I can't 1311 And note that even though I (the author of &kdiff3;) try to do my best, I can't
1332 guarantee that there are no bugs. According to the GNU-GPL there is NO WARRANTY 1312 guarantee that there are no bugs. According to the GNU-GPL there is NO WARRANTY
1333 whatsoever for this program. So be humble and always keep in mind: 1313 whatsoever for this program. So be humble and always keep in mind:
1334 </para> 1314 </para>
1335 <blockquote><para> 1315 <blockquote><para>
1336 <emphasis>To err is human, but to really mess things up you need a computer.</emphasis> 1316 <emphasis>To err is human, but to really mess things up you need a computer.</emphasis>
1337 </para></blockquote> 1317 </para></blockquote>
1338 <para> 1318 <para>
1339 So this is what this program can do for you: KDiff3 ... 1319 So this is what this program can do for you: &kdiff3; ...
1340 </para> 1320 </para>
1341 <itemizedlist> 1321 <itemizedlist>
1342 <listitem><para>... reads and compares two or three directories recursively,</para></listitem> 1322 <listitem><para>... reads and compares two or three directories recursively,</para></listitem>
1343 <listitem><para>... takes special care of symbolic links,</para></listitem> 1323 <listitem><para>... takes special care of symbolic links,</para></listitem>
1344 <listitem><para>... lets you browse files on mouse double click,</para></listitem> 1324 <listitem><para>... lets you browse files on mouse double click,</para></listitem>
1365 <screen> 1345 <screen>
1366 <command>kdiff3</command> <replaceable>dir1 dir2</replaceable> 1346 <command>kdiff3</command> <replaceable>dir1 dir2</replaceable>
1367 <command>kdiff3</command> <replaceable>dir1 dir2</replaceable> -o <replaceable>destdir</replaceable> 1347 <command>kdiff3</command> <replaceable>dir1 dir2</replaceable> -o <replaceable>destdir</replaceable>
1368 </screen> 1348 </screen>
1369 <para> 1349 <para>
1370 If no destination directory is specified, then KDiff3 will use <replaceable>dir2</replaceable>. 1350 If no destination directory is specified, then &kdiff3; will use <replaceable>dir2</replaceable>.
1371 </para> 1351 </para>
1372 </sect2> 1352 </sect2>
1373 1353
1374 <sect2><title>Compare/Merge three directories: </title> 1354 <sect2><title>Compare/Merge three directories: </title>
1375 <screen> 1355 <screen>
1377 <command>kdiff3</command> <replaceable>dir1 dir2 dir3</replaceable> -o <replaceable>destdir</replaceable> 1357 <command>kdiff3</command> <replaceable>dir1 dir2 dir3</replaceable> -o <replaceable>destdir</replaceable>
1378 </screen> 1358 </screen>
1379 <para> 1359 <para>
1380 When three directories are merged then <replaceable>dir1</replaceable> 1360 When three directories are merged then <replaceable>dir1</replaceable>
1381 is used as the base for the merge. 1361 is used as the base for the merge.
1382 If no destination directory is specified, then KDiff3 will use <replaceable>dir3</replaceable> 1362 If no destination directory is specified, then &kdiff3; will use <replaceable>dir3</replaceable>
1383 as the destination directory for the merge. 1363 as the destination directory for the merge.
1384 </para> 1364 </para>
1385 1365
1386 <para> 1366 <para>
1387 Note that only the comparison starts automatically, not the merge. For this you first must 1367 Note that only the comparison starts automatically, not the merge. For this you first must
1394 <para> 1374 <para>
1395 While reading the directories a message-box appears that informs you of 1375 While reading the directories a message-box appears that informs you of
1396 the progress. If you abort the directory scan, then only files that have 1376 the progress. If you abort the directory scan, then only files that have
1397 been compared until then will be listed. 1377 been compared until then will be listed.
1398 </para><para> 1378 </para><para>
1399 When the directory scan is complete then KDiff3 will show a listbox with 1379 When the directory scan is complete then &kdiff3; will show a listbox with
1400 the results left, ... 1380 the results left, ...
1401 </para> 1381 </para>
1402 <screenshot><mediaobject> 1382 <screenshot><mediaobject>
1403 <imageobject><imagedata fileref="dirbrowser.png" format="PNG"/></imageobject> <!--alt="Image of the directory browser."--> 1383 <imageobject><imagedata fileref="dirbrowser.png" format="PNG"/></imageobject> <!--alt="Image of the directory browser."-->
1404 </mediaobject></screenshot> 1384 </mediaobject></screenshot>
1468 when old. 1448 when old.
1469 </para> 1449 </para>
1470 1450
1471 </sect2><sect2 id="operation"><title>The Operation Column</title> 1451 </sect2><sect2 id="operation"><title>The Operation Column</title>
1472 <para> 1452 <para>
1473 After comparing the directories KDiff3 also evaluates a proposal for a 1453 After comparing the directories &kdiff3; also evaluates a proposal for a
1474 merge operation. This is shown in the "Operation" column. You can modify 1454 merge operation. This is shown in the "Operation" column. You can modify
1475 the operation by clicking on the operation you want to change. A small menu 1455 the operation by clicking on the operation you want to change. A small menu
1476 will popup and allows you to select an operation for that item. (You can also 1456 will popup and allows you to select an operation for that item. (You can also
1477 select the most needed operations via keyboard. 1457 select the most needed operations via keyboard.
1478 Ctrl+1/2/3/4/Del will select A/B/C/Merge/Delete respectively if available.) 1458 Ctrl+1/2/3/4/Del will select A/B/C/Merge/Delete respectively if available.)
1515 B is a file): "Error: Conflicting File Types". While such items exist the 1495 B is a file): "Error: Conflicting File Types". While such items exist the
1516 directory merge cannot start.</para></listitem> 1496 directory merge cannot start.</para></listitem>
1517 </itemizedlist> 1497 </itemizedlist>
1518 <para> 1498 <para>
1519 Sync-mode is active if only two directories and no explicit destination 1499 Sync-mode is active if only two directories and no explicit destination
1520 were specified and if the option "Synchronize directories" is active. KDiff3 1500 were specified and if the option "Synchronize directories" is active. &kdiff3;
1521 then selects a default operation so that both directories are the same afterwards. 1501 then selects a default operation so that both directories are the same afterwards.
1522 If for an item ... 1502 If for an item ...
1523 </para> 1503 </para>
1524 <itemizedlist> 1504 <itemizedlist>
1525 <listitem><para>... both directories are equal: Nothing will be done.</para></listitem> 1505 <listitem><para>... both directories are equal: Nothing will be done.</para></listitem>
1526 <listitem><para>... A exists, but not B: Copy A to B</para></listitem> 1506 <listitem><para>... A exists, but not B: Copy A to B</para></listitem>
1527 <listitem><para>... B exists, but not A: Copy B to A</para></listitem> 1507 <listitem><para>... B exists, but not A: Copy B to A</para></listitem>
1528 <listitem><para>... A and B exist, but are not equal: Merge and store the result 1508 <listitem><para>... A and B exist, but are not equal: Merge and store the result
1529 in both directories. (For the user the visible save-filename is B, 1509 in both directories. (For the user the visible save-filename is B,
1530 but then KDiff3 copies B also to A.)</para></listitem> 1510 but then &kdiff3; copies B also to A.)</para></listitem>
1531 <listitem><para>... A and B don't have the same file type (e.g. A is a directory, 1511 <listitem><para>... A and B don't have the same file type (e.g. A is a directory,
1532 B is a file): "Error: Conflicting File Types". While such items exist the 1512 B is a file): "Error: Conflicting File Types". While such items exist the
1533 directory merge cannot start.</para></listitem> 1513 directory merge cannot start.</para></listitem>
1534 </itemizedlist> 1514 </itemizedlist>
1535 <para> 1515 <para>
1536 When two directories are merged and the option "Copy newer instead of merging" is selected, 1516 When two directories are merged and the option "Copy newer instead of merging" is selected,
1537 then KDiff3 looks at the dates and proposes to choose the newer file. If the files are not 1517 then &kdiff3; looks at the dates and proposes to choose the newer file. If the files are not
1538 equal but have equal dates, then the operation will contain 1518 equal but have equal dates, then the operation will contain
1539 "Error: Dates are equal but files are not." While such items exist the 1519 "Error: Dates are equal but files are not." While such items exist the
1540 directory merge cannot start. 1520 directory merge cannot start.
1541 </para> 1521 </para>
1542 </sect2> 1522 </sect2>
1552 </sect2> 1532 </sect2>
1553 1533
1554 <sect2 id="statisticscolulmns"><title>Statistics Columns</title> 1534 <sect2 id="statisticscolulmns"><title>Statistics Columns</title>
1555 <para> 1535 <para>
1556 When the file comparison mode "Full Analysis" is enabled in the options, then 1536 When the file comparison mode "Full Analysis" is enabled in the options, then
1557 KDiff3 will show extra columns containing the numbers of unsolved, solved, nonwhite and whitespace 1537 &kdiff3; will show extra columns containing the numbers of unsolved, solved, nonwhite and whitespace
1558 conflicts. (The solved-column will only show when comparing or merging three directories.) 1538 conflicts. (The solved-column will only show when comparing or merging three directories.)
1559 </para> 1539 </para>
1560 </sect2> 1540 </sect2>
1561 1541
1562 <sect2 id="selectingvisiblefiles"><title>Selecting Listed Files</title> 1542 <sect2 id="selectingvisiblefiles"><title>Selecting Listed Files</title>
1577 The list will be updated immediately to reflect the change. 1557 The list will be updated immediately to reflect the change.
1578 </para><para> 1558 </para><para>
1579 These options also apply for directories with one exception: Disabling "Show Different Files" will not hide 1559 These options also apply for directories with one exception: Disabling "Show Different Files" will not hide
1580 any complete directories. This will work only for files within. 1560 any complete directories. This will work only for files within.
1581 </para><para> 1561 </para><para>
1582 Note that of these only the "Show Identical Files"-option is persistant. The others are enabled when starting KDiff3. 1562 Note that of these only the "Show Identical Files"-option is persistant. The others are enabled when starting &kdiff3;.
1583 </para> 1563 </para>
1584 </sect2> 1564 </sect2>
1585 1565
1586 </sect1> 1566 </sect1>
1587 1567
1608 <listitem><para>"Exclude Hidden Files"</para></listitem> 1588 <listitem><para>"Exclude Hidden Files"</para></listitem>
1609 <listitem><para><link linkend="selectingvisiblefiles">"Show"-options</link> (Show Identical/Different Files, Files only in A/B/C)</para></listitem> 1589 <listitem><para><link linkend="selectingvisiblefiles">"Show"-options</link> (Show Identical/Different Files, Files only in A/B/C)</para></listitem>
1610 </itemizedlist> 1590 </itemizedlist>
1611 <para> 1591 <para>
1612 If you change the settings in order to list more files, you must do a rescan via menu "Directory"->"Rescan" yourself. 1592 If you change the settings in order to list more files, you must do a rescan via menu "Directory"->"Rescan" yourself.
1613 (The reason for this is that for faster comparison-speed KDiff3 omits the comparison for files suppressed by these criteria.) 1593 (The reason for this is that for faster comparison-speed &kdiff3; omits the comparison for files suppressed by these criteria.)
1614 If you changed your file and dir patterns to exclude files, then the file-list will immediately be updated on closing 1594 If you changed your file and dir patterns to exclude files, then the file-list will immediately be updated on closing
1615 the options-dialog. 1595 the options-dialog.
1616 </para><para> 1596 </para><para>
1617 Note that when you write to a completely new directory then you usually also want to copy the identical files. 1597 Note that when you write to a completely new directory then you usually also want to copy the identical files.
1618 In that case enable the "Show Identical Files"-option. If your destination-directory is one of the inputs, 1598 In that case enable the "Show Identical Files"-option. If your destination-directory is one of the inputs,
1636 <listitem><para>Select "Simulate it" if you want to see what would be done without 1616 <listitem><para>Select "Simulate it" if you want to see what would be done without
1637 actually doing it. A verbose list of all operations will be shown.</para></listitem> 1617 actually doing it. A verbose list of all operations will be shown.</para></listitem>
1638 <listitem><para>Otherwise select "Do it" to really start merging.</para></listitem> 1618 <listitem><para>Otherwise select "Do it" to really start merging.</para></listitem>
1639 </itemizedlist> 1619 </itemizedlist>
1640 <para> 1620 <para>
1641 Then KDiff3 will run the specified operation for all items. If manual 1621 Then &kdiff3; will run the specified operation for all items. If manual
1642 interaction is required (single file merge), then a merge window will open 1622 interaction is required (single file merge), then a merge window will open
1643 (<link linkend="dirmergebigscreenshot">see the big screenshot</link>). 1623 (<link linkend="dirmergebigscreenshot">see the big screenshot</link>).
1644 </para><para> 1624 </para><para>
1645 When you have finished with manually merging a file, again select "Start/Continue directory 1625 When you have finished with manually merging a file, again select "Start/Continue directory
1646 merge" or the key F7. If you haven't saved it yet, a dialog will ask you to 1626 merge" or the key F7. If you haven't saved it yet, a dialog will ask you to
1647 do so. Then KDiff3 will continue with the next item. 1627 do so. Then &kdiff3; will continue with the next item.
1648 </para><para> 1628 </para><para>
1649 When KDiff3 encounters an error, it will tell you so and will show the 1629 When &kdiff3; encounters an error, it will tell you so and will show the
1650 verbose-status-information. At the bottom of this list, there will be some 1630 verbose-status-information. At the bottom of this list, there will be some
1651 error messages which should help you to understand the cause of the problem. 1631 error messages which should help you to understand the cause of the problem.
1652 When you continue merging (F7 key) KDiff3 will give you the choice to retry 1632 When you continue merging (F7 key) &kdiff3; will give you the choice to retry
1653 or skip the item that caused the problem. This means that before continuing 1633 or skip the item that caused the problem. This means that before continuing
1654 you can choose another operation or solve the problem by other means. 1634 you can choose another operation or solve the problem by other means.
1655 </para><para> 1635 </para><para>
1656 When the merge is complete, then KDiff3 will inform you via a message 1636 When the merge is complete, then &kdiff3; will inform you via a message
1657 box. 1637 box.
1658 </para><para> 1638 </para><para>
1659 If some items were merged individually before running the directorymerge then 1639 If some items were merged individually before running the directorymerge then
1660 KDiff3 remembers this (while this 1640 &kdiff3; remembers this (while this
1661 merge-session goes on), and doesn't merge them again when later the merge for 1641 merge-session goes on), and doesn't merge them again when later the merge for
1662 all items is run. Even when the merge was skipped or nothing was saved these 1642 all items is run. Even when the merge was skipped or nothing was saved these
1663 items count as completed. Only when you change the merge operation the 1643 items count as completed. Only when you change the merge operation the
1664 "Done"-status of the item will be removed and it can be merged again. 1644 "Done"-status of the item will be removed and it can be merged again.
1665 </para> 1645 </para>
1666 </sect1> 1646 </sect1>
1667 1647
1668 <sect1 id="dirmergeoptions"><title>Options for Comparing and Merging Directories</title> 1648 <sect1 id="dirmergeoptions"><title>Options for Comparing and Merging Directories</title>
1669 <para> 1649 <para>
1670 The KDiff3-preferences (menu "Settings"-&gt;"Configure KDiff3") has 1650 The &kdiff3;-preferences (menu "Settings"-&gt;"Configure &kdiff3;") has
1671 a section called "Directory Merge" with these options: 1651 a section called "Directory Merge" with these options:
1672 </para> 1652 </para>
1673 1653
1674 <variablelist> 1654 <variablelist>
1675 <varlistentry><term><emphasis>Recursive Directories:</emphasis></term><listitem><para> Select whether to search directories 1655 <varlistentry><term><emphasis>Recursive Directories:</emphasis></term><listitem><para> Select whether to search directories
1689 <varlistentry><term><emphasis>Use CVS-Ignore:</emphasis></term><listitem><para> 1669 <varlistentry><term><emphasis>Use CVS-Ignore:</emphasis></term><listitem><para>
1690 Ignore files and directories that would also be ignored by CVS. 1670 Ignore files and directories that would also be ignored by CVS.
1691 Many automatically generated files are ignored by CVS. 1671 Many automatically generated files are ignored by CVS.
1692 The big advantage is that this can be directory specific via a local ".cvsignore"-file. 1672 The big advantage is that this can be directory specific via a local ".cvsignore"-file.
1693 (See <ulink url="info:/cvs/cvsignore">info:/cvs/cvsignore</ulink>.)</para></listitem></varlistentry> 1673 (See <ulink url="info:/cvs/cvsignore">info:/cvs/cvsignore</ulink>.)</para></listitem></varlistentry>
1694 <varlistentry><term><emphasis>Find Hidden Files and Directories:</emphasis></term><listitem><para> On some filesystems files 1674 <varlistentry><term><emphasis>Find Hidden Files and Directories:</emphasis></term><listitem><para> On some file systems files
1695 have an "Hidden"-attribute. On other systems a filename starting with a dot 1675 have an "Hidden"-attribute. On other systems a filename starting with a dot
1696 "." causes it to be hidden. This option allows you to decide whether to 1676 "." causes it to be hidden. This option allows you to decide whether to
1697 include these files in the tree or not. Default is on.</para></listitem></varlistentry> 1677 include these files in the tree or not. Default is on.</para></listitem></varlistentry>
1698 <varlistentry><term><emphasis>Follow File Links:</emphasis></term><listitem><para> For links to files: When disabled, then 1678 <varlistentry><term><emphasis>Follow File Links:</emphasis></term><listitem><para> For links to files: When disabled, then
1699 the symbolic links are compared. When enabled, then the files behind the 1679 the symbolic links are compared. When enabled, then the files behind the
1794 <title>Miscellaneous Topics</title> 1774 <title>Miscellaneous Topics</title>
1795 <sect1 id="networktransparency"> 1775 <sect1 id="networktransparency">
1796 <title>Networktransparency via KIO</title> 1776 <title>Networktransparency via KIO</title>
1797 <sect2><title>KIO-Slaves</title> 1777 <sect2><title>KIO-Slaves</title>
1798 <para> 1778 <para>
1799 KDE supports networktransparency via KIO-slaves. KDiff3 uses this 1779 KDE supports networktransparency via KIO-slaves. &kdiff3; uses this
1800 for reading input files and for scanning directories. 1780 for reading input files and for scanning directories.
1801 This means that you can specify files and directories on local and 1781 This means that you can specify files and directories on local and
1802 remote resources via URLs. 1782 remote resources via URLs.
1803 </para><para> 1783 </para><para>
1804 Example: 1784 Example:
1850 1830
1851 <sect2><title>Capabilities of KIO-Slaves</title> 1831 <sect2><title>Capabilities of KIO-Slaves</title>
1852 <para> 1832 <para>
1853 Networktransparency has one drawback: Not all ressources have the same cababilities. 1833 Networktransparency has one drawback: Not all ressources have the same cababilities.
1854 </para><para> 1834 </para><para>
1855 Sometimes this is due to the filesystem of the server, sometimes due to the protocol. 1835 Sometimes this is due to the file system of the server, sometimes due to the protocol.
1856 Here is a short list of restrictions: 1836 Here is a short list of restrictions:
1857 </para> 1837 </para>
1858 <itemizedlist> 1838 <itemizedlist>
1859 <listitem><para> 1839 <listitem><para>
1860 Sometimes there is no support for links. 1840 Sometimes there is no support for links.
1878 <title>Using &kdiff3; as a KPart</title> 1858 <title>Using &kdiff3; as a KPart</title>
1879 <para> 1859 <para>
1880 &kdiff3; is a KPart. Currently it implements the KParts::ReadOnlyPart-interface. 1860 &kdiff3; is a KPart. Currently it implements the KParts::ReadOnlyPart-interface.
1881 </para><para> 1861 </para><para>
1882 It's main use is as difference-viewer in KDevelop. KDevelop always starts the 1862 It's main use is as difference-viewer in KDevelop. KDevelop always starts the
1883 internal difference viewer first. To invoke KDiff3 press the right mouse button 1863 internal difference viewer first. To invoke &kdiff3; press the right mouse button
1884 on the difference viewer window and select "Show in KDiff3Part" from the contextmenu. 1864 on the difference viewer window and select "Show in KDiff3Part" from the contextmenu.
1885 </para><para> 1865 </para><para>
1886 KDiff3 normally requires two complete files as input. When used as part KDiff3 1866 &kdiff3; normally requires two complete files as input. When used as part &kdiff3;
1887 will assume that the inputfile is a patch-file in the unified format. KDiff3 1867 will assume that the inputfile is a patch-file in the unified format. &kdiff3;
1888 then retrieves the original filenames from the patch-file. At least one of 1868 then retrieves the original filenames from the patch-file. At least one of
1889 the two files must be available. KDiff3 will then invoke <command>patch</command> to 1869 the two files must be available. &kdiff3; will then invoke <command>patch</command> to
1890 recreate the second file. 1870 recreate the second file.
1891 </para><para> 1871 </para><para>
1892 In Konqueror you can select a patch-file and select "Preview in"-"KDiff3Part" from 1872 In Konqueror you can select a patch-file and select "Preview in"-"KDiff3Part" from
1893 the contextmenu. Be aware that this won't work if none of the original files are 1873 the contextmenu. Be aware that this won't work if none of the original files are
1894 available, and it is not reliable if the original file(s) have changed since the 1874 available, and it is not reliable if the original file(s) have changed since the
1895 patch-file was generated. 1875 patch-file was generated.
1896 </para><para> 1876 </para><para>
1897 When run as a part KDiff3 only provides the a two-file-diff, a very small toolbar 1877 When run as a part &kdiff3; only provides the a two-file-diff, a very small toolbar
1898 and menu. Merging or directory-comparison are not supported then. 1878 and menu. Merging or directory-comparison are not supported then.
1899 </para> 1879 </para>
1900 </sect1> 1880 </sect1>
1901 </chapter> 1881 </chapter>
1902 1882
1907 &updating.documentation; 1887 &updating.documentation;
1908 1888
1909 <qandaset id="faqlist"> 1889 <qandaset id="faqlist">
1910 1890
1911 <qandaentry><question><para> 1891 <qandaentry><question><para>
1912 Why is it called "KDiff3"? 1892 Why is it called "&kdiff3;"?
1913 </para></question><answer><para> 1893 </para></question><answer><para>
1914 Tools named "KDiff" and "KDiff2" (now called "Kompare") already exist. Also "KDiff3" should suggest 1894 Tools named "KDiff" and "KDiff2" (now called "Kompare") already exist. Also "KDiff3" should suggest
1915 that it can merge like the "diff3"-tool in the Diff-Tool collection. 1895 that it can merge like the "diff3"-tool in the Diff-Tool collection.
1916 </para></answer></qandaentry> 1896 </para></answer></qandaentry>
1917 1897
1968 button. For big editing the use of another editor is recommended anyway. 1948 button. For big editing the use of another editor is recommended anyway.
1969 </para></answer></qandaentry> 1949 </para></answer></qandaentry>
1970 1950
1971 <qandaentry><question><para> 1951 <qandaentry><question><para>
1972 When I removed some text, then suddenly "&lt;No src line&gt;" appeared 1952 When I removed some text, then suddenly "&lt;No src line&gt;" appeared
1973 and can't be deleted. What does that mean and how can one remove this? 1953 and cannot be deleted. What does that mean and how can one remove this?
1974 </para></question><answer><para> 1954 </para></question><answer><para>
1975 For each equal or different section the editor in the merge result 1955 For each equal or different section the editor in the merge result
1976 window remembers where it begins or ends. "&lt;No src line&gt;" means 1956 window remembers where it begins or ends. "&lt;No src line&gt;" means
1977 that there is nothing left in a section, not even a new line character. 1957 that there is nothing left in a section, not even a new line character.
1978 This can happen either while merging automatically or by editing. This is 1958 This can happen either while merging automatically or by editing. This is
1981 column) and then click the source button with the needed contents (A/B or 1961 column) and then click the source button with the needed contents (A/B or
1982 C). 1962 C).
1983 </para></answer></qandaentry> 1963 </para></answer></qandaentry>
1984 1964
1985 <qandaentry><question><para> 1965 <qandaentry><question><para>
1986 Why doesn't KDiff3 support syntax-highlighting? 1966 Why doesn't &kdiff3; support syntax-highlighting?
1987 </para></question><answer><para> 1967 </para></question><answer><para>
1988 KDiff3 already uses many colors for difference highlighting. More 1968 &kdiff3; already uses many colors for difference highlighting. More
1989 highlighting would be confusing. Use another editor for this. 1969 highlighting would be confusing. Use another editor for this.
1990 </para></answer></qandaentry> 1970 </para></answer></qandaentry>
1991 1971
1992 <qandaentry><question><para> 1972 <qandaentry><question><para>
1993 Can I use KDiff3 to compare OpenOffice.Org, Word, Excel, PDF-, etc. files? 1973 Can I use &kdiff3; to compare OpenOffice.Org, Word, Excel, PDF-, &etc; files?
1994 </para></question><answer><para> 1974 </para></question><answer><para>
1995 Although KDiff3 will analyse any kind of file the result will probably 1975 Although &kdiff3; will analyse any kind of file the result will probably
1996 not be very satisfactory for you. 1976 not be very satisfactory for you.
1997 </para><para> 1977 </para><para>
1998 KDiff3 was made to compare pure text files. OpenOffice, Word, Excel etc. 1978 &kdiff3; was made to compare pure text files. OpenOffice, Word, Excel etc.
1999 store much more information in the files (about fonts, pictures, pages, 1979 store much more information in the files (about fonts, pictures, pages,
2000 colors etc.) which KDiff3 doesn't know about. So KDiff3 will 1980 colors etc.) which &kdiff3; doesn't know about. So &kdiff3; will
2001 show you the contents of the file interpreted as pure text, but 1981 show you the contents of the file interpreted as pure text, but
2002 this might be unreadable or at least it will look very odd. 1982 this might be unreadable or at least it will look very odd.
2003 </para><para> 1983 </para><para>
2004 Since most programs nowadays store their contents in XML-format, you might 1984 Since most programs nowadays store their contents in XML-format, you might
2005 be able to read it as pure text. So if the change was only small, 1985 be able to read it as pure text. So if the change was only small,
2006 KDiff3 still might help you. 1986 &kdiff3; still might help you.
2007 </para><para> 1987 </para><para>
2008 The best solution if you only want to compare the text (without embedded 1988 The best solution if you only want to compare the text (without embedded
2009 objects like pictures) is to use "Select All" and "Copy" in your program 1989 objects like pictures) is to use "Select All" and "Copy" in your program
2010 to copy the interesting text to the clipoard and then in KDiff3 paste the 1990 to copy the interesting text to the clipoard and then in &kdiff3; paste the
2011 text into either diff input window. 1991 text into either diff input window.
2012 (See also <link linkend="selections">Select, Copy And Paste</link>.) 1992 (See also <link linkend="selections">Select, Copy And Paste</link>.)
2013 </para></answer></qandaentry> 1993 </para></answer></qandaentry>
2014 1994
2015 <qandaentry><question><para> 1995 <qandaentry><question><para>
2046 </para> 2026 </para>
2047 <para> 2027 <para>
2048 Program copyright 2002-2006 Joachim Eibl <email>joachim.eibl at gmx.de</email> 2028 Program copyright 2002-2006 Joachim Eibl <email>joachim.eibl at gmx.de</email>
2049 </para> 2029 </para>
2050 <para> 2030 <para>
2051 Several cool ideas and bugreports came from colleagues and many people out in the World Wild Web. Thank you! 2031 Several cool ideas and bugreports came from colleagues and many people out in the Wild Wild Web. Thank you!
2052 </para> 2032 </para>
2053 2033
2054 <para> 2034 <para>
2055 Documentation Copyright &copy; 2002-2006 Joachim Eibl <email>joachim.eibl at gmx.de</email> 2035 Documentation Copyright &copy; 2002-2006 Joachim Eibl <email>joachim.eibl at gmx.de</email>
2056 </para> 2036 </para>
2069 2049
2070 <sect1 id="getting-kdiff3"> 2050 <sect1 id="getting-kdiff3">
2071 <title>How to obtain &kdiff3;</title> 2051 <title>How to obtain &kdiff3;</title>
2072 2052
2073 <para> 2053 <para>
2074 You can download the latest version of KDiff3 from its homepage <ulink url="http://kdiff3.sourceforge.net">http://kdiff3.sourceforge.net</ulink>. 2054 You can download the latest version of &kdiff3; from its homepage <ulink url="http://kdiff3.sourceforge.net">http://kdiff3.sourceforge.net</ulink>.
2075 </para><para> 2055 </para><para>
2076 KDiff3 is also available for other platforms. See the homepage for details. 2056 &kdiff3; is also available for other platforms. See the homepage for details.
2077 </para> 2057 </para>
2078 2058
2079 2059
2080 </sect1> 2060 </sect1>
2081 2061
2083 <title>Requirements</title> 2063 <title>Requirements</title>
2084 2064
2085 <para> 2065 <para>
2086 In order to successfully use all features of &kdiff3;, you need &kde; >3.1. 2066 In order to successfully use all features of &kdiff3;, you need &kde; >3.1.
2087 </para><para> 2067 </para><para>
2088 For information about how to run KDiff3 on other platforms without KDE please see the 2068 For information about how to run &kdiff3; on other platforms without KDE please see the
2089 <ulink url="http://kdiff3.sourceforge.net">homepage</ulink>. 2069 <ulink url="http://kdiff3.sourceforge.net">homepage</ulink>.
2090 </para><para> 2070 </para><para>
2091 You can find a list of changes at <ulink 2071 You can find a list of changes at <ulink
2092 url="http://kdiff3.sourceforge.net/ChangeLog">http://kdiff3.sourceforge.net/ChangeLog</ulink> 2072 url="http://kdiff3.sourceforge.net/ChangeLog">http://kdiff3.sourceforge.net/ChangeLog</ulink>
2093 or in the "ChangeLog"-file of the source package. 2073 or in the "ChangeLog"-file of the source package.