Log dialog can revert selected files to parent revision
[TortoiseGit.git] / doc / source / en / TortoiseGit / tsvn_dug / dug_settings_progs.xml
blob50646c005cb4a68ad53248170e7133b4f9f896bc
1 <?xml version="1.0" encoding="UTF-8"?>\r
2 <!DOCTYPE sect2 SYSTEM "../../../dtd/dblite.dtd">\r
3 <sect2 id="tsvn-dug-settings-progs">\r
4         <title>External Program Settings</title>\r
5         <para>\r
6                 Here you can define your own programs that TortoiseGit\r
7                 should use. The default setting is to use tools\r
8                 which are installed alongside TortoiseGit.\r
9         </para>\r
10         <para>\r
11                 Read <xref linkend="tsvn-dug-diff-tools"/> for a list of some of the\r
12                 external diff/merge programs that people are using with TortoiseGit.\r
13         </para>\r
14         <sect3 id="tsvn-dug-settings-Diff">\r
15                 <title>Diff Viewer</title>\r
16                 <?dbhh topicname="HIDD_SETTINGSPROGSDIFF"?>\r
17                 <figure id="tsvn-dug-settings-dia-5">\r
18                         <title>The Settings Dialog, Diff Viewer Page</title>\r
19                         <graphic fileref="../images/SettingsProgs.png"/>\r
20                 </figure>\r
21                 <para>\r
22                         An external diff program may be used for comparing different\r
23                         revisions of files. The external program will need to\r
24                         obtain the filenames from the command line, along with\r
25                         any other command line options. TortoiseGit uses\r
26                         substitution parameters prefixed with <literal>%</literal>.\r
27                         When it encounters one of these it will substitute the\r
28                         appropriate value. The order of the parameters will depend\r
29                         on the Diff program you use.\r
30                         <variablelist>\r
31                                 <varlistentry>\r
32                                         <term condition="pot">%base</term>\r
33                                         <listitem>\r
34                                                 <para>\r
35                                                         The original file without your changes\r
36                                                 </para>\r
37                                         </listitem>\r
38                                 </varlistentry>\r
39                                 <varlistentry>\r
40                                         <term condition="pot">%bname</term>\r
41                                         <listitem>\r
42                                                 <para>\r
43                                                         The window title for the base file\r
44                                                 </para>\r
45                                         </listitem>\r
46                                 </varlistentry>\r
47                                 <varlistentry>\r
48                                         <term condition="pot">%mine</term>\r
49                                         <listitem>\r
50                                                 <para>\r
51                                                         Your own file, with your changes\r
52                                                 </para>\r
53                                         </listitem>\r
54                                 </varlistentry>\r
55                                 <varlistentry>\r
56                                         <term condition="pot">%yname</term>\r
57                                         <listitem>\r
58                                                 <para>\r
59                                                         The window title for your file\r
60                                                 </para>\r
61                                         </listitem>\r
62                                 </varlistentry>\r
63                                 <varlistentry>\r
64                                         <term condition="pot">%bpath</term>\r
65                                         <listitem>\r
66                                                 <para>\r
67                                                         Full path to the original file\r
68                                                 </para>\r
69                                         </listitem>\r
70                                 </varlistentry>\r
71                                 <varlistentry>\r
72                                         <term condition="pot">%ypath</term>\r
73                                         <listitem>\r
74                                                 <para>\r
75                                                         Full path to your file\r
76                                                 </para>\r
77                                         </listitem>\r
78                                 </varlistentry>\r
79                                 <varlistentry>\r
80                                         <term condition="pot">%brev</term>\r
81                                         <listitem>\r
82                                                 <para>\r
83                                                         The revision of the original file, if available\r
84                                                 </para>\r
85                                         </listitem>\r
86                                 </varlistentry>\r
87                                 <varlistentry>\r
88                                         <term condition="pot">%yrev</term>\r
89                                         <listitem>\r
90                                                 <para>\r
91                                                         The revision of the second file, if available\r
92                                                 </para>\r
93                                         </listitem>\r
94                                 </varlistentry>\r
95                         </variablelist>\r
96                 </para>\r
97                 <para>\r
98                         The window titles are not pure filenames.\r
99                         TortoiseGit treats that as a name to display and creates\r
100                         the names accordingly. So e.g. if you're doing a\r
101                         diff from a file in revision 123 with a file \r
102                         in your working tree, the names will be\r
103                         <filename>filename: revision 123</filename>\r
104                         and\r
105                         <filename>filename: working tree</filename>\r
106                 </para>\r
107                 <para>\r
108                         For example, with ExamDiff Pro:\r
109 <screen>\r
110 C:\Path-To\ExamDiff.exe %base %mine --left_display_name:%bname\r
111     --right_display_name:%yname\r
112 </screen>\r
113                         or with KDiff3:\r
114 <screen>\r
115 C:\Path-To\kdiff3.exe %base %mine --L1 %bname --L2 %yname\r
116 </screen>\r
117                         or with WinMerge:\r
118 <screen>\r
119 C:\Path-To\WinMerge.exe -e -ub -dl %bname -dr %yname %base %mine\r
120 </screen>\r
121                         or with Araxis:\r
122 <screen>\r
123 C:\Path-To\compare.exe /max /wait /title1:%bname /title2:%yname\r
124     %base %mine\r
125 </screen>\r
126                 </para>\r
127                 <para>\r
128                         You can also specify a different diff tool to use on Git\r
129                         properties. Since these tend to be short simple text strings, you\r
130                         may want to use a simpler more compact viewer.\r
131                 </para>\r
132                 <para>\r
133                         If you have configured an alternate diff tool, you can access\r
134                         TortoiseMerge <emphasis>and</emphasis> the third party tool\r
135                         from the context menus.\r
136                         <menuchoice>\r
137                                 <guimenu>Context menu</guimenu>\r
138                                 <guimenuitem>Diff</guimenuitem>\r
139                         </menuchoice>\r
140                         uses the primary diff tool, and\r
141                         <keycap>Shift</keycap>+\r
142                         <menuchoice>\r
143                                 <guimenu>Context menu</guimenu>\r
144                                 <guimenuitem>Diff</guimenuitem>\r
145                         </menuchoice>\r
146                         uses the secondary diff tool.\r
147                 </para>\r
148                 <para>\r
149                         A viewer program for unified-diff files (GNU diff or patch files).\r
150                         No parameters are required.\r
151                         The <guilabel>Default</guilabel> option is to check for\r
152                         a file association for <filename>.diff</filename> files,\r
153                         and then for <filename>.txt</filename> files.\r
154                         If you don't have a viewer for <filename>.diff</filename>\r
155                         files, you will most likely get NotePad.\r
156                 </para>\r
157                 <para>\r
158                         The original Windows NotePad program does not behave\r
159                         well on files which do not have standard CR-LF\r
160                         line-endings. Since most unified diff files have pure\r
161                         LF line-endings, they do not view well in NotePad.\r
162                         However, you can use a free NotePad replacement\r
163                         <ulink url="http://www.flos-freeware.ch/notepad2.html">\r
164                                 <citetitle>Notepad2</citetitle>\r
165                         </ulink> (this is also shipped with TortoiseGit)\r
166                         which not only displays the line-endings correctly,\r
167                         but also colour codes the added and removed lines.\r
168                 </para>\r
169         </sect3>\r
170         <sect3 id="tsvn-dug-settings-Merge">\r
171                 <title>Merge Tool</title>\r
172                 <?dbhh topicname="HIDD_SETTINGSPROGSMERGE"?>\r
173                 <figure id="tsvn-dug-settings-dia-5a">\r
174                         <title>The Settings Dialog, Merge Tool Page</title>\r
175                         <graphic fileref="../images/SettingsMergeTool.png"/>\r
176                 </figure>\r
177                 <para>\r
178                         An external merge program used to resolve conflicted\r
179                         files. Parameter substitution is used in the same way\r
180                         as with the Diff Program.\r
181                         <variablelist>\r
182                                 <varlistentry>\r
183                                         <term condition="pot">%base</term>\r
184                                         <listitem>\r
185                                                 <para>\r
186                                                         the original file without your or\r
187                                                         the others changes\r
188                                                 </para>\r
189                                         </listitem>\r
190                                 </varlistentry>\r
191                                 <varlistentry>\r
192                                         <term condition="pot">%bname</term>\r
193                                         <listitem>\r
194                                                 <para>\r
195                                                         The window title for the base file\r
196                                                 </para>\r
197                                         </listitem>\r
198                                 </varlistentry>\r
199                                 <varlistentry>\r
200                                         <term condition="pot">%mine</term>\r
201                                         <listitem>\r
202                                                 <para>\r
203                                                         your own file, with your changes\r
204                                                 </para>\r
205                                         </listitem>\r
206                                 </varlistentry>\r
207                                 <varlistentry>\r
208                                         <term condition="pot">%yname</term>\r
209                                         <listitem>\r
210                                                 <para>\r
211                                                         The window title for your file\r
212                                                 </para>\r
213                                         </listitem>\r
214                                 </varlistentry>\r
215                                 <varlistentry>\r
216                                         <term condition="pot">%theirs</term>\r
217                                         <listitem>\r
218                                                 <para>\r
219                                                         the file as it is in the repository\r
220                                                 </para>\r
221                                         </listitem>\r
222                                 </varlistentry>\r
223                                 <varlistentry>\r
224                                         <term condition="pot">%tname</term>\r
225                                         <listitem>\r
226                                                 <para>\r
227                                                         The window title for the file in the repository\r
228                                                 </para>\r
229                                         </listitem>\r
230                                 </varlistentry>\r
231                                 <varlistentry>\r
232                                         <term condition="pot">%merged</term>\r
233                                         <listitem>\r
234                                                 <para>\r
235                                                         the conflicted file, the result of\r
236                                                         the merge operation\r
237                                                 </para>\r
238                                         </listitem>\r
239                                 </varlistentry>\r
240                                 <varlistentry>\r
241                                         <term condition="pot">%mname</term>\r
242                                         <listitem>\r
243                                                 <para>\r
244                                                         The window title for the merged file\r
245                                                 </para>\r
246                                         </listitem>\r
247                                 </varlistentry>\r
248                         </variablelist>\r
249                 </para>\r
250                 <para>\r
251                         For example, with Perforce Merge:\r
252 <screen>\r
253 C:\Path-To\P4Merge.exe %base %theirs %mine %merged\r
254 </screen>\r
255                         or with KDiff3:\r
256 <screen>\r
257 C:\Path-To\kdiff3.exe %base %mine %theirs -o %merged\r
258     --L1 %bname --L2 %yname --L3 %tname\r
259 </screen>\r
260                         or with Araxis:\r
261 <screen>\r
262 C:\Path-To\compare.exe /max /wait /3 /title1:%tname /title2:%bname\r
263     /title3:%yname %theirs %base %mine %merged /a2\r
264 </screen>\r
265                         or with WinMerge (2.8 or later):\r
266 <screen>\r
267 C:\Path-To\WinMerge.exe %merged\r
268 </screen>\r
269                 </para>\r
270         </sect3>\r
271         <sect3 id="tsvn-dug-settings-Progs-Adv">\r
272                 <title>Diff/Merge Advanced Settings</title>\r
273                 <?dbhh topicname="HIDD_SETTINGSPROGSADV"?>\r
274                 <para>\r
275                         <figure id="tsvn-dug-settings-dia-6">\r
276                                 <title>The Settings Dialog, Diff/Merge Advanced Dialog</title>\r
277                                 <graphic fileref="../images/SettingsProgsAdv.png"/>\r
278                         </figure>\r
279                         In the advanced settings, you can define a different diff and merge\r
280                         program for every file extension. For instance you could associate\r
281                         Photoshop as the <quote>Diff</quote> Program for <filename>.jpg</filename> files :-)\r
282                 </para>\r
283                 <para>\r
284                         To associate using a file extension, you need to specify the extension.\r
285                         Use <literal>.bmp</literal> to describe Windows bitmap files.\r
286                 </para>\r
287         </sect3>\r
288         <sect3 id="tsvn-dug-settings-alternativeeditor">\r
289                 <title>Alternative editor</title>\r
290                 <?dbhh topicname="HIDD_SETTINGSPROGSALTERNATIVEEDITOR"?>\r
291                 <figure id="tsvn-dug-settings-dia-6b">\r
292                         <title>The Settings Dialog, Alternative editor Page</title>\r
293                         <graphic fileref="../images/SettingsAlternativeEditor.png"/>\r
294                 </figure>\r
295                 <para>\r
296                         The original Windows NotePad program does not behave\r
297                         well on files which do not have standard CR-LF\r
298                         line-endings. However, a lot of git configuration files do not have\r
299                         a standard CR-LF line-ending. Because of this TortoiseGit uses a free\r
300                         (shipped) NotePad replacement\r
301                         <ulink url="http://www.flos-freeware.ch/notepad2.html">\r
302                                 <citetitle>Notepad2</citetitle>\r
303                         </ulink>\r
304                         which displays the line-endings correctly by default.\r
305                 </para>\r
306         </sect3>\r
307 </sect2>\r