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
6 <figure id="tsvn-dug-settings-dia-5">
\r
7 <title>The Settings Dialog, Diff Viewer Page</title>
\r
8 <?dbhh topicname="HIDD_SETTINGSPROGSDIFF"?>
\r
9 <graphic fileref="../images/SettingsProgs.png"/>
\r
11 Here you can define your own diff/merge programs that TortoiseGit
\r
12 should use. The default setting is to use TortoiseMerge
\r
13 which is installed alongside TortoiseGit.
\r
16 Read <xref linkend="tsvn-dug-diff-tools"/> for a list of some of the
\r
17 external diff/merge programs that people are using with TortoiseGit.
\r
19 <sect3 id="tsvn-dug-settings-Diff">
\r
20 <title>Diff Viewer</title>
\r
21 <?dbhh topicname="HIDD_SETTINGSPROGSDIFF"?>
\r
23 An external diff program may be used for comparing different
\r
24 revisions of files. The external program will need to
\r
25 obtain the filenames from the command line, along with
\r
26 any other command line options. TortoiseGit uses
\r
27 substitution parameters prefixed with <literal>%</literal>.
\r
28 When it encounters one of these it will substitute the
\r
29 appropriate value. The order of the parameters will depend
\r
30 on the Diff program you use.
\r
33 <term condition="pot">%base</term>
\r
36 The original file without your changes
\r
41 <term condition="pot">%bname</term>
\r
44 The window title for the base file
\r
49 <term condition="pot">%mine</term>
\r
52 Your own file, with your changes
\r
57 <term condition="pot">%yname</term>
\r
60 The window title for your file
\r
67 The window titles are not pure filenames.
\r
68 TortoiseGit treats that as a name to display and creates
\r
69 the names accordingly. So e.g. if you're doing a
\r
70 diff from a file in revision 123 with a file
\r
71 in your working copy, the names will be
\r
72 <filename>filename : revision 123</filename>
\r
74 <filename>filename : working copy</filename>
\r
77 For example, with ExamDiff Pro:
\r
79 C:\Path-To\ExamDiff.exe %base %mine --left_display_name:%bname
\r
80 --right_display_name:%yname
\r
84 C:\Path-To\kdiff3.exe %base %mine --L1 %bname --L2 %yname
\r
88 C:\Path-To\WinMerge.exe -e -ub -dl %bname -dr %yname %base %mine
\r
92 C:\Path-To\compare.exe /max /wait /title1:%bname /title2:%yname
\r
97 If you use the <literal>svn:keywords</literal> property to
\r
98 expand keywords, and in particular the <emphasis>revision</emphasis>
\r
99 of a file, then there may be a difference between files which
\r
100 is purely due to the current value of the keyword. Also if you use
\r
101 <literal>svn:eol-style = native</literal> the BASE file will have
\r
102 pure <literal>LF</literal> line endings whereas your file will
\r
103 have <literal>CR-LF</literal> line endings. TortoiseGit will normally hide
\r
104 these differences automatically by first parsing the BASE file to
\r
105 expand keywords and line endings before doing the diff operation.
\r
106 However, this can take a long time with large files. If
\r
107 <guilabel>Convert files when diffing against BASE</guilabel>
\r
108 is unchecked then TortoiseGit will skip pre-processing the files.
\r
111 You can also specify a different diff tool to use on Git
\r
112 properties. Since these tend to be short simple text strings, you
\r
113 may want to use a simpler more compact viewer.
\r
116 If you have configured an alternate diff tool, you can access
\r
117 TortoiseMerge <emphasis>and</emphasis> the third party tool
\r
118 from the context menus.
\r
120 <guimenu>Context menu</guimenu>
\r
121 <guimenuitem>Diff</guimenuitem>
\r
123 uses the primary diff tool, and
\r
124 <keycap>Shift</keycap>+
\r
126 <guimenu>Context menu</guimenu>
\r
127 <guimenuitem>Diff</guimenuitem>
\r
129 uses the secondary diff tool.
\r
132 <sect3 id="tsvn-dug-settings-Merge">
\r
133 <title>Merge Tool</title>
\r
134 <?dbhh topicname="HIDD_SETTINGSPROGSMERGE"?>
\r
136 An external merge program used to resolve conflicted
\r
137 files. Parameter substitution is used in the same way
\r
138 as with the Diff Program.
\r
141 <term condition="pot">%base</term>
\r
144 the original file without your or
\r
150 <term condition="pot">%bname</term>
\r
153 The window title for the base file
\r
158 <term condition="pot">%mine</term>
\r
161 your own file, with your changes
\r
166 <term condition="pot">%yname</term>
\r
169 The window title for your file
\r
174 <term condition="pot">%theirs</term>
\r
177 the file as it is in the repository
\r
182 <term condition="pot">%tname</term>
\r
185 The window title for the file in the repository
\r
190 <term condition="pot">%merged</term>
\r
193 the conflicted file, the result of
\r
194 the merge operation
\r
199 <term condition="pot">%mname</term>
\r
202 The window title for the merged file
\r
209 For example, with Perforce Merge:
\r
211 C:\Path-To\P4Merge.exe %base %theirs %mine %merged
\r
215 C:\Path-To\kdiff3.exe %base %mine %theirs -o %merged
\r
216 --L1 %bname --L2 %yname --L3 %tname
\r
220 C:\Path-To\compare.exe /max /wait /3 /title1:%tname /title2:%bname
\r
221 /title3:%yname %theirs %base %mine %merged /a2
\r
223 or with WinMerge (2.8 or later):
\r
225 C:\Path-To\WinMerge.exe %merged
\r
229 <sect3 id="tsvn-dug-settings-Progs-Adv">
\r
230 <title>Diff/Merge Advanced Settings</title>
\r
231 <?dbhh topicname="HIDD_SETTINGSPROGSADV"?>
\r
233 <figure id="tsvn-dug-settings-dia-6">
\r
234 <title>The Settings Dialog, Diff/Merge Advanced Dialog</title>
\r
235 <graphic fileref="../images/SettingsProgsAdv.png"/>
\r
237 In the advanced settings, you can define a different diff and merge
\r
238 program for every file extension. For instance you could associate
\r
239 Photoshop as the <quote>Diff</quote> Program for <filename>.jpg</filename> files :-)
\r
240 You can also associate the <literal>svn:mime-type</literal> property
\r
241 with a diff or merge program.
\r
244 To associate using a file extension, you need to specify the extension.
\r
245 Use <literal>.bmp</literal> to describe Windows bitmap files.
\r
246 To associate using the <literal>svn:mime-type</literal> property, specify
\r
247 the mime type, including a slash, for example
\r
248 <literal>text/xml</literal>.
\r
251 <sect3 id="tsvn-dug-settings-Patch">
\r
252 <title>Unified Diff Viewer</title>
\r
253 <?dbhh topicname="HIDD_SETTINGSPROGSUNIDIFF"?>
\r
255 A viewer program for unified-diff files (patch files).
\r
256 No parameters are required.
\r
257 The <guilabel>Default</guilabel> option is to check for
\r
258 a file association for <filename>.diff</filename> files,
\r
259 and then for <filename>.txt</filename> files.
\r
260 If you don't have a viewer for <filename>.diff</filename>
\r
261 files, you will most likely get NotePad.
\r
264 The original Windows NotePad program does not behave
\r
265 well on files which do not have standard CR-LF
\r
266 line-endings. Since most unified diff files have pure
\r
267 LF line-endings, they do not view well in NotePad.
\r
268 However, you can download a free NotePad replacement
\r
269 <ulink url="http://www.flos-freeware.ch/notepad2.html">
\r
270 <citetitle>Notepad2</citetitle>
\r
272 which not only displays the line-endings correctly,
\r
273 but also colour codes the added and removed lines.
\r