1 <?xml version="1.0" encoding="UTF-8"?>
\r
2 <!DOCTYPE appendix SYSTEM "../../dtd/dblite.dtd">
\r
3 <appendix id="tme-automation">
\r
4 <title>Automating TortoiseGitMerge</title>
\r
7 TortoiseGitMerge can be started with command line parameters to avoid having
\r
8 to go through the <guilabel>Open</guilabel> dialog to select the files
\r
9 yourself. This is useful also if you want to use TortoiseGitMerge from
\r
10 another application.
\r
13 <!-- ================================================================= -->
\r
14 <!-- ======================== SECTION 1 ============================== -->
\r
15 <!-- ================================================================= -->
\r
16 <sect1 id="tme-automation-basics">
\r
17 <title>TortoiseGitMerge Command Line Switches</title>
\r
19 <primary>automation</primary>
\r
22 <primary>command line</primary>
\r
25 Most switches require additional information like a path or some
\r
26 other string. In those cases, append an ':' to the switch and put
\r
27 the string/path after it. Example:
\r
29 /base:"c:\folder\my base file.txt"
\r
33 ATTENTION ATTENTION ATTENTION ATTENTION ATTENTION ATTENTION ATTENTION ATTENTION
\r
34 Don't touch these lines:
\r
35 <entry condition="pot">/about</entry>
\r
37 The condition="pot" prevents the strings from being extracted into
\r
38 the .pot file, so nobody translates them.
\r
39 The '/' in front of the command has to stay there to prevent these strings
\r
40 from being translated if the po file "by chance" contains a matching translation.
\r
43 <table id="tme-automation-1-table">
\r
44 <title>List of available command line options</title>
\r
46 <colspec colnum="1" colwidth="2*"/>
\r
47 <colspec colnum="2" colwidth="6*"/>
\r
50 <entry>Command</entry>
\r
51 <entry>Description</entry>
\r
56 <entry condition="pot">/?</entry>
\r
58 Shows a dialog box with the most important command line
\r
63 <entry condition="pot">/help</entry>
\r
65 The same as <option>?</option>.
\r
69 <entry condition="pot">/base</entry>
\r
71 Specifies the <emphasis>base</emphasis> file used
\r
72 in three way diffs. This is the common ancestor
\r
73 of the files being diffed, although it is not
\r
74 shown in a separate window.
\r
75 For two way diffs, this is the left file.
\r
79 <entry condition="pot">/basename</entry>
\r
81 The name of the base file.
\r
82 This is shown in the view title instead of the file path.
\r
83 For three way diffs it is shown in a tooltip for the
\r
88 <entry condition="pot">/basereflectedname</entry>
\r
90 The name to use for EditorConfig templates.
\r
94 <entry condition="pot">/theirs</entry>
\r
96 Specifies the <emphasis>theirs</emphasis> file used
\r
97 in three way diffs, displayed in the left pane.
\r
101 <entry condition="pot">/theirsname</entry>
\r
103 The name of the theirs file. This is shown in the
\r
104 view title instead of the file path.
\r
108 <entry condition="pot">/theirsreflectedname</entry>
\r
110 The name to use for EditorConfig templates.
\r
114 <entry condition="pot">/mine</entry>
\r
116 Specifies the <emphasis>mine</emphasis> file used
\r
117 in three way diffs, displayed in the right pane.
\r
118 For two way diffs, this is the right file.
\r
122 <entry condition="pot">/minename</entry>
\r
124 The name of the mine file. This is shown in the
\r
125 view title instead of the file path.
\r
129 <entry condition="pot">/minereflectedname</entry>
\r
131 The name to use for EditorConfig templates.
\r
135 <entry condition="pot">/merged</entry>
\r
137 Specifies the resulting <emphasis>merged</emphasis> file used
\r
138 in three way diffs. This is the file path where the result of
\r
139 the merge/conflict resolving is saved.
\r
140 If this is not set, then TortoiseGitMerge will ask the user where
\r
141 to save the result.
\r
145 <entry condition="pot">/mergedname</entry>
\r
147 The name of the merged file. This is shown in the
\r
148 view title instead of the file path.
\r
152 <entry condition="pot">/mergedreflectedname</entry>
\r
154 The name to use for EditorConfig templates.
\r
158 <entry condition="pot">/patchpath</entry>
\r
160 The path where a patch should be applied to. If you don't
\r
161 set this path, then TortoiseGitMerge will try to find the path
\r
162 itself to match the paths in the patch file, but that can take
\r
163 <emphasis>very long</emphasis>.
\r
167 <entry condition="pot">/saverequired</entry>
\r
169 If specified, forces TortoiseGitMerge to ask to save the file
\r
170 before exiting, even if the user does not modify the files.
\r
174 <entry condition="pot">/saverequiredonconflicts</entry>
\r
176 If specified, forces TortoiseGitMerge to ask to save the file
\r
177 before exiting if there are conflicts found, even if the user
\r
178 does not modify the files.
\r
182 <entry condition="pot">/patchoriginal</entry>
\r
184 The name of the original file to patch. Used for the view
\r
189 <entry condition="pot">/patchpatched</entry>
\r
191 The name of the resulting patched file. Used for the view
\r
196 <entry condition="pot">/diff</entry>
\r
198 The path to the patch/diff file to apply to a directory.
\r
202 <entry condition="pot">/oneway</entry>
\r
204 Forces TortoiseGitMerge to start with the one-way view
\r
205 instead of the view the user specified in the settings.
\r
209 <entry condition="pot">/reversedpatch</entry>
\r
211 Switches the left and right view of the specified
\r
216 <entry condition="pot">/createunifieddiff</entry>
\r
218 Creates a unified diff file (patch file) of two files
\r
220 <literal>/origfile:"path_to_original_file"</literal> and
\r
221 <literal>/modifiedfile:"path_to_modified_file"</literal>.
\r
222 The target path is set with
\r
223 <literal>/outfile:"path_to_resulting_patchfile"</literal>.
\r
224 If <literal>/outfile</literal> is not set, a file save dialog
\r
225 is shown so the user can choose the location to save the
\r
227 Note: If <literal>/createunifieddiff</literal> is set,
\r
228 all other parameters are ignored.
\r
232 <entry condition="pot">/line</entry>
\r
234 Specifies a line number to jump to after loading
\r
239 <entry condition="pot">/readonly</entry>
\r
241 Prevents the file from being edited. That means
\r
242 the editing capabilities of TortoiseGitMerge are
\r
251 You can also supply simple filenames on the command line for compatibility
\r
252 with other diff programs. In this simplified form the command line is
\r
254 TortoiseGitMerge BaseFilePath MyFilePath [ TheirFilePath ]
\r
256 If two files are given they will be compared with each other.
\r
257 If three files are given, the first is taken as the BASE file,
\r
258 and the other two are compared with it in a three-way diff.
\r