Updated TortoiseMerge docs from TortoiseSVN source
[TortoiseGit.git] / doc / source / en / TortoiseMerge / tme_app_automation.xml
blob7578375692e6d0ba70ea776a0f2c241265ed5d5d
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
5     <simplesect>\r
6         <para>\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
11         </para>\r
12     </simplesect>\r
13     <!-- ================================================================= -->\r
14     <!-- ======================== SECTION 1 ============================== -->\r
15     <!-- ================================================================= -->\r
16     <sect1 id="tme-automation-basics">\r
17         <title>TortoiseGitMerge Command Line Switches</title>\r
18         <indexterm>\r
19             <primary>automation</primary>\r
20         </indexterm>\r
21         <indexterm>\r
22             <primary>command line</primary>\r
23         </indexterm>\r
24         <para>\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
28 <screen>\r
29 /base:"c:\folder\my base file.txt"\r
30 </screen>\r
31         </para>\r
32 <!--\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
41 -->\r
42         <para>\r
43             <table id="tme-automation-1-table">\r
44                 <title>List of available command line options</title>\r
45                 <tgroup cols="2">\r
46                     <colspec colnum="1" colwidth="2*"/>\r
47                     <colspec colnum="2" colwidth="6*"/>\r
48                     <thead>\r
49                         <row>\r
50                             <entry>Command</entry>\r
51                             <entry>Description</entry>\r
52                         </row>\r
53                     </thead>\r
54                     <tbody>\r
55                         <row>\r
56                             <entry condition="pot">/?</entry>\r
57                             <entry>\r
58                                 Shows a dialog box with the most important command line\r
59                                 switches.\r
60                             </entry>\r
61                         </row>\r
62                         <row>\r
63                             <entry condition="pot">/help</entry>\r
64                             <entry>\r
65                                 The same as <option>?</option>.\r
66                             </entry>\r
67                         </row>\r
68                         <row>\r
69                             <entry condition="pot">/base</entry>\r
70                             <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
76                             </entry>\r
77                         </row>\r
78                         <row>\r
79                             <entry condition="pot">/basename</entry>\r
80                             <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
84                                 view title.\r
85                             </entry>\r
86                         </row>\r
87                         <row>\r
88                             <entry condition="pot">/theirs</entry>\r
89                             <entry>\r
90                                 Specifies the <emphasis>theirs</emphasis> file used\r
91                                 in three way diffs, displayed in the left pane.\r
92                             </entry>\r
93                         </row>\r
94                         <row>\r
95                             <entry condition="pot">/theirsname</entry>\r
96                             <entry>\r
97                                 The name of the theirs file. This is shown in the\r
98                                 view title instead of the file path.\r
99                             </entry>\r
100                         </row>\r
101                         <row>\r
102                             <entry condition="pot">/mine</entry>\r
103                             <entry>\r
104                                 Specifies the <emphasis>mine</emphasis> file used\r
105                                 in three way diffs, displayed in the right pane.\r
106                                 For two way diffs, this is the right file.\r
107                             </entry>\r
108                         </row>\r
109                         <row>\r
110                             <entry condition="pot">/minename</entry>\r
111                             <entry>\r
112                                 The name of the mine file. This is shown in the\r
113                                 view title instead of the file path.\r
114                             </entry>\r
115                         </row>\r
116                         <row>\r
117                             <entry condition="pot">/merged</entry>\r
118                             <entry>\r
119                                 Specifies the resulting <emphasis>merged</emphasis> file used\r
120                                 in three way diffs. This is the file path where the result of\r
121                                 the merge/conflict resolving is saved.\r
122                                 If this is not set, then TortoiseGitMerge will ask the user where\r
123                                 to save the result.\r
124                             </entry>\r
125                         </row>\r
126                         <row>\r
127                             <entry condition="pot">/mergedname</entry>\r
128                             <entry>\r
129                                 The name of the merged file. This is shown in the\r
130                                 view title instead of the file path.\r
131                             </entry>\r
132                         </row>\r
133                         <row>\r
134                             <entry condition="pot">/patchpath</entry>\r
135                             <entry>\r
136                                 The path where a patch should be applied to. If you don't\r
137                                 set this path, then TortoiseGitMerge will try to find the path\r
138                                 itself to match the paths in the patch file, but that can take\r
139                                 <emphasis>very long</emphasis>.\r
140                             </entry>\r
141                         </row>\r
142                         <row>\r
143                             <entry condition="pot">/patchoriginal</entry>\r
144                             <entry>\r
145                                 The name of the original file to patch. Used for the view\r
146                                 title.\r
147                             </entry>\r
148                         </row>\r
149                         <row>\r
150                             <entry condition="pot">/patchpatched</entry>\r
151                             <entry>\r
152                                 The name of the resulting patched file. Used for the view\r
153                                 title.\r
154                             </entry>\r
155                         </row>\r
156                         <row>\r
157                             <entry condition="pot">/diff</entry>\r
158                             <entry>\r
159                                 The path to the patch/diff file to apply to a directory.\r
160                             </entry>\r
161                         </row>\r
162                         <row>\r
163                             <entry condition="pot">/oneway</entry>\r
164                             <entry>\r
165                                 Forces TortoiseGitMerge to start with the one-way view\r
166                                 instead of the view the user specified in the settings.\r
167                             </entry>\r
168                         </row>\r
169                         <row>\r
170                             <entry condition="pot">/reversedpatch</entry>\r
171                             <entry>\r
172                                 Switches the left and right view of the specified\r
173                                 two files to diff.\r
174                             </entry>\r
175                         </row>\r
176                         <row>\r
177                             <entry condition="pot">/createunifieddiff</entry>\r
178                             <entry>\r
179                                 Creates a unified diff file (patch file) of two files\r
180                                 specified with\r
181                                 <literal>/origfile:"path_to_original_file"</literal> and\r
182                                 <literal>/modifiedfile:"path_to_modified_file"</literal>.\r
183                                 The target path is set with\r
184                                 <literal>/outfile:"path_to_resulting_patchfile"</literal>.\r
185                                 If <literal>/outfile</literal> is not set, a file save dialog\r
186                                 is shown so the user can choose the location to save the\r
187                                 patch file.\r
188                                 Note: If <literal>/createunifieddiff</literal> is set,\r
189                                 all other parameters are ignored.\r
190                             </entry>\r
191                         </row>\r
192                         <row>\r
193                             <entry condition="pot">/line</entry>\r
194                             <entry>\r
195                                 Specifies a line number to jump to after loading\r
196                                 the files.\r
197                             </entry>\r
198                         </row>\r
199                         <row>\r
200                             <entry condition="pot">/readonly</entry>\r
201                             <entry>\r
202                                 Prevents the file from being edited. That means\r
203                                 the editing capabilities of TortoiseGitMerge are\r
204                                 disabled.\r
205                             </entry>\r
206                         </row>\r
207                     </tbody>\r
208                 </tgroup>\r
209             </table>\r
210         </para>\r
211         <para>\r
212             You can also supply simple filenames on the command line for compatibility\r
213             with other diff programs. In this simplified form the command line is\r
214 <screen>\r
215 TortoiseGitMerge BaseFilePath MyFilePath [ TheirFilePath ]\r
216 </screen>\r
217             If two files are given they will be compared with each other.\r
218             If three files are given, the first is taken as the BASE file,\r
219             and the other two are compared with it in a three-way diff.\r
220         </para>\r
221     </sect1>\r
222 </appendix>\r