<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE appendix SYSTEM "../../dtd/dblite.dtd">
<appendix id="tsvn-automation">
  <title>Automating TortoiseSVN</title>
  <simplesect>
    <para>
      Since all commands for TortoiseSVN are controlled through command
      line parameters, you can automate it with batch scripts or start specific
      commands and dialogs from other programs (e.g. your favourite text editor).
    </para>
    <important>
      <para>
        Remember that TortoiseSVN is a GUI client, and this automation guide
        shows you how to make the TortoiseSVN dialogs appear to collect user
        input. If you want to write a script which requires no input, you should
        use the official Subversion command line client instead.
      </para>
    </important>
  </simplesect>
  <!-- ================================================================= -->
  <!-- ======================== SECTION 1 ============================== -->
  <!-- ================================================================= -->
  <sect1 id="tsvn-automation-basics">
    <title>TortoiseSVN Commands</title>
    <indexterm>
      <primary>automation</primary>
    </indexterm>
    <indexterm>
      <primary>command line</primary>
    </indexterm>
    <para>
      The TortoiseSVN GUI program is called <literal>TortoiseProc.exe</literal>.
      All commands are specified with the parameter <option>/command:abcd</option>
      where <literal>abcd</literal> is the required command name. Most of these
      commands need at least one path argument, which is given with
      <option>/path:"some\path"</option>. In the following table the command
      refers to the <option>/command:abcd</option> parameter and the path
      refers to the <option>/path:"some\path"</option> parameter.
    </para>
    <para>
      There's a special command that does not require the parameter <option>/command:abcd</option>
      but, if nothing is specified on the command line, starts the project monitor instead.
      If <option>/tray</option> is specified, the project monitor starts hidden and only
      adds its icon to the system tray.
    </para>
    <para>
      Since some of the commands can take a list of target paths (e.g. committing
      several specific files) the <option>/path</option> parameter can take
      several paths, separated by a <literal>*</literal> character.
    </para>
    <para>
      You can also specify a file which contains a list of paths, separated by
      newlines. The file must be in UTF-16 format, without a
      <ulink url="https://en.wikipedia.org/wiki/Byte-order_mark">
        <citetitle>BOM</citetitle>
      </ulink>.
      If you pass such a file, use <option>/pathfile</option> instead of
      <option>/path</option>. To have TortoiseProc delete that file after
      the command is finished, you can pass the parameter <option>/deletepathfile</option>.
      If you don't pass <option>/deletepathfile</option>, you have to delete the file
      yourself or the file gets left behind.
    </para>
    <para>
      The progress dialog which is used for commits, updates and many more commands
      usually stays open after the command has finished until the user presses
      the <guibutton>OK</guibutton> button. This can be changed by checking
      the corresponding option in the settings dialog. But using that setting
      will close the progress dialog, no matter if you start the command
      from your batch file or from the TortoiseSVN context menu.
    </para>
    <para>
      To specify a different location of the configuration file, use the parameter
      <option>/configdir:"path\to\config\directory"</option>.
      This will override the default path, including any registry setting.
    </para>
    <para>
      To close the progress dialog at the end of a command automatically without
      using the permanent setting you can pass the <option>/closeonend</option>
      parameter.
      <itemizedlist>
        <listitem>
          <para>
            <option>/closeonend:0</option> don't close the dialog automatically
          </para>
        </listitem>
        <listitem>
          <para>
            <option>/closeonend:1</option> auto close if no errors
          </para>
        </listitem>
        <listitem>
          <para>
            <option>/closeonend:2</option> auto close if no errors and conflicts
          </para>
        </listitem>
        <listitem>
          <para>
            <option>/closeonend:3</option> auto close if no errors, conflicts and merges
          </para>
        </listitem>
      </itemizedlist>
      To close the progress dialog for local operations if there were no
      errors or conflicts, pass the <option>/closeforlocal</option> parameter.
    </para>
    <para>
      The table below lists all the commands which can be accessed
      using the TortoiseProc.exe command line. As described above,
      these should be used in the form <literal>/command:abcd</literal>.
      In the table, the <literal>/command</literal> prefix is omitted
      to save space.
    </para>
    <!--
ATTENTION ATTENTION ATTENTION ATTENTION ATTENTION ATTENTION ATTENTION ATTENTION
Don't touch these lines:
<entry condition="pot">:about</entry>

  The condition="pot" prevents the strings from being extracted into
    the .pot file, so nobody translates them.
  The colons in front of the command have to stay there to prevent these strings
  from being translated if the po file "by chance" contains a matching translation.
-->
    <para>
      <table id="tsvn-automation-1-table">
        <title>List of available commands and options</title>
        <tgroup cols="2">
          <colspec colnum="1" colwidth="2*"/>
          <colspec colnum="2" colwidth="6*"/>
          <thead>
            <row>
              <entry>Command</entry>
              <entry>Description</entry>
            </row>
          </thead>
          <tbody>
            <row>
              <entry condition="pot">:about</entry>
              <entry>
                Shows the about dialog. This is also shown if no
                command is given.
              </entry>
            </row>
            <row>
              <entry condition="pot">:log</entry>
              <entry>
                <para>
                  Opens the log dialog. The <option>/path</option> specifies the
                  file or folder for which the log should be shown.
                  Additional options can be set:
                  <itemizedlist>
                    <listitem>
                      <para>
                        <option>/startrev:xxx</option>,
                      </para>
                    </listitem>
                    <listitem>
                      <para>
                        <option>/endrev:xxx</option>,
                      </para>
                    </listitem>
                    <listitem>
                      <para>
                        <option>/limit:xxx</option> limits the amount of fetched messages
                      </para>
                    </listitem>
                    <listitem>
                      <para>
                        <option>/strict</option> enables the 'stop-on-copy' checkbox,
                      </para>
                    </listitem>
                    <listitem>
                      <para>
                        <option>/merge</option> enables the 'include merged revisions' checkbox,
                      </para>
                    </listitem>
                    <listitem>
                      <para>
                        <option>/datemin:"{datestring}"</option> sets the start date of the filter, and
                      </para>
                    </listitem>
                    <listitem>
                      <para>
                        <option>/datemax:"{datestring}"</option> sets the end date of the filter. The
                        date format is the same as used for svn date revisions.
                      </para>
                    </listitem>
                    <listitem>
                      <para>
                        <option>/findstring:"filterstring"</option> fills in the filter text,
                      </para>
                    </listitem>
                    <listitem>
                      <para>
                        <option>/findtext</option> forces the filter to use text, not regex, or
                      </para>
                    </listitem>
                    <listitem>
                      <para>
                        <option>/findregex</option> forces the filter to use regex, not simple text search, and
                      </para>
                    </listitem>
                    <listitem>
                      <para>
                        <option>/findtype:X</option> with X being a number between 0 and 511. The numbers
                        are the sum of the following options:
                        <itemizedlist>
                          <listitem>
                            <para>
                              <option>/findtype:0</option> filter by everything
                            </para>
                          </listitem>
                          <listitem>
                            <para>
                              <option>/findtype:1</option> filter by messages
                            </para>
                          </listitem>
                          <listitem>
                            <para>
                              <option>/findtype:2</option> filter by path
                            </para>
                          </listitem>
                          <listitem>
                            <para>
                              <option>/findtype:4</option> filter by authors
                            </para>
                          </listitem>
                          <listitem>
                            <para>
                              <option>/findtype:8</option> filter by revisions
                            </para>
                          </listitem>
                          <listitem>
                            <para>
                              <option>/findtype:16</option> not used
                            </para>
                          </listitem>
                          <listitem>
                            <para>
                              <option>/findtype:32</option> filter by bug ID
                            </para>
                          </listitem>
                          <listitem>
                            <para>
                              <option>/findtype:64</option> not used
                            </para>
                          </listitem>
                          <listitem>
                            <para>
                              <option>/findtype:128</option> filter by date
                            </para>
                          </listitem>
                          <listitem>
                            <para>
                              <option>/findtype:256</option> filter by date range
                            </para>
                          </listitem>
                        </itemizedlist>
                      </para>
                    </listitem>
                    <listitem>
                      <para>
                        If <option>/outfile:path\to\file</option> is specified,
                        the selected revisions are written to that file when
                        the log dialog is closed. The revisions are written
                        in the same format as is used to specify revisions
                        in the merge dialog.
                      </para>
                    </listitem>
                  </itemizedlist>
                </para>
                <para>
                  An svn date revision can be in one of the following formats:
                  <itemizedlist condition="pot">
                    <listitem>
                      <para>{2006-02-17}</para>
                    </listitem>
                    <listitem>
                      <para>{15:30}</para>
                    </listitem>
                    <listitem>
                      <para>{15:30:00.200000}</para>
                    </listitem>
                    <listitem>
                      <para>{"2006-02-17 15:30"}</para>
                    </listitem>
                    <listitem>
                      <para>{"2006-02-17 15:30 +0230"}</para>
                    </listitem>
                    <listitem>
                      <para>{2006-02-17T15:30}</para>
                    </listitem>
                    <listitem>
                      <para>{2006-02-17T15:30Z}</para>
                    </listitem>
                    <listitem>
                      <para>{2006-02-17T15:30-04:00}</para>
                    </listitem>
                    <listitem>
                      <para>{20060217T1530}</para>
                    </listitem>
                    <listitem>
                      <para>{20060217T1530Z}</para>
                    </listitem>
                    <listitem>
                      <para>{20060217T1530-0500}</para>
                    </listitem>
                  </itemizedlist>
                </para>
              </entry>
            </row>
            <row>
              <entry condition="pot">:checkout</entry>
              <entry>
                <para>
                  Opens the checkout dialog. The <option>/path</option>
                  specifies the target directory and the <option>/url</option>
                  specifies the URL to checkout from.
                  If you specify the key <option>/blockpathadjustments</option>,
                  the automatic checkout path adjustments are blocked.
                  The <option>/revision:XXX</option> specifies the revision to
                  check out.
                </para>
                <para>
                  If you specify <option>/outfile:"path/to/file"</option> the
                  specified file will contain three lines after a checkout.
                  The first line is the checkout path, the second line the url
                  and the third the revision.
                </para>
              </entry>
            </row>
            <row>
              <entry condition="pot">:import</entry>
              <entry>
                Opens the import dialog. The <option>/path</option>
                specifies the directory with the data to import.
                You can also specify the <option>/logmsg</option> switch
                to pass a predefined log message to the import dialog.
                Or, if you don't want to pass the log message on the
                command line, use <option>/logmsgfile:path</option>,
                where <option>path</option>
                points to a file containing the log message.
              </entry>
            </row>
            <row>
              <entry condition="pot">:update</entry>
              <entry>
                Updates the working copy in <option>/path</option> to
                HEAD. If the option <option>/rev</option> is given
                then a dialog is shown to ask the user to which
                revision the update should go. To avoid the dialog
                specify a revision number <option>/rev:1234</option>.
                Other options are <option>/nonrecursive</option>,
                <option>/ignoreexternals</option> and
                <option>/includeexternals</option>.
                The <option>/stickydepth</option> indicates that
                the specified depth should be sticky, creating
                a sparse checkout.
                The <option>/skipprechecks</option> can be set
                to skip all checks that are done before an update. If this
                is specified, then the <guilabel>Show log</guilabel> button
                is disabled, and the context menu
                to show diffs is also disabled after the update.
              </entry>
            </row>
            <row>
              <entry condition="pot">:commit</entry>
              <entry>
                Opens the commit dialog. The <option>/path</option> specifies the
                target directory or the list of files to commit.
                You can also specify the <option>/logmsg</option> switch
                to pass a predefined log message to the commit dialog.
                Or, if you don't want to pass the log message on the
                command line, use <option>/logmsgfile:path</option>,
                where <option>path</option>
                points to a file containing the log message.
                To pre-fill the bug ID box (in case you've set up
                integration with bug trackers properly), you can use
                the <option>/bugid:"the bug id here"</option> to
                do that.
              </entry>
            </row>
            <row>
              <entry condition="pot">:add</entry>
              <entry>
                Adds the files in <option>/path</option> to
                version control.
              </entry>
            </row>
            <row>
              <entry condition="pot">:revert</entry>
              <entry>
                Reverts local modifications of a working copy.
                The <option>/path</option> tells which items
                to revert.
              </entry>
            </row>
            <row>
              <entry condition="pot">:cleanup</entry>
              <entry>
                Cleans up interrupted or aborted operations and
                unlocks the working copy in <option>/path</option>.
                You also have to pass the <option>/cleanup</option> to
                actually do the cleanup.
                Use <option>/noui</option> to prevent the result
                dialog from popping up (either telling about
                the cleanup being finished or showing an error message).
                <option>/noprogressui</option> also disables the
                progress dialog. <option>/nodlg</option> disables
                showing the cleanup dialog where the user can
                choose what exactly should be done in the cleanup.
                The available actions can be specified with the
                options <option>/cleanup</option> for status cleanup, <option>/breaklocks</option>
                to break all locks, <option>/revert</option> to revert uncommitted changes, <option>/delunversioned</option>,
                <option>/delignored</option>, <option>/refreshshell</option>,
                <option>/externals</option>, <option>/fixtimestamps</option>
                and <option>/vacuum</option>.
              </entry>
            </row>
            <row>
              <entry condition="pot">:resolve</entry>
              <entry>
                Marks a conflicted file specified in
                <option>/path</option> as resolved. If
                <option>/noquestion</option> is given, then resolving
                is done without asking the user first if it really
                should be done.
              </entry>
            </row>
            <row>
              <entry condition="pot">:repocreate</entry>
              <entry>
                Creates a repository in <option>/path</option>
              </entry>
            </row>
            <row>
              <entry condition="pot">:switch</entry>
              <entry>
                Opens the switch dialog. The <option>/path</option> specifies the
                target directory and <option>/url</option> the
                URL to switch to.
              </entry>
            </row>
            <row>
              <entry condition="pot">:export</entry>
              <entry>
                Exports the working copy in <option>/path</option>
                to another directory. If the <option>/path</option>
                points to an unversioned directory, a dialog will ask
                for an URL to export to the directory in <option>/path</option>.
                If you specify the key <option>/blockpathadjustments</option>,
                the automatic export path adjustments are blocked.
              </entry>
            </row>
            <row>
              <entry condition="pot">:dropexport</entry>
              <entry>
                Exports the working copy in <option>/path</option>
                to the directory specified in <option>/droptarget</option>.
                This exporting does not use the export dialog but
                executes directly. The option <option>/overwrite</option>
                specifies that existing files are overwritten without
                user confirmation, and the option <option>/autorename</option>
                specifies that if files already exist, the exported
                files get automatically renamed to avoid overwriting
                them. The option <option>/extended</option> can specify either
                <literal>localchanges</literal> to only export files that
                got changed locally, or <literal>unversioned</literal>
                to also export all unversioned items as well.
              </entry>
            </row>
            <row>
              <entry condition="pot">:dropvendor</entry>
              <entry>
                Copies the folder in <option>/path</option> recursively
                to the directory specified in <option>/droptarget</option>.
                New files are added automatically, and missing files get
                removed in the target working copy, basically ensuring
                that source and destination are exactly the same.
                Specify <option>/noui</option> to skip the confirmation dialog,
                and <option>/noprogressui</option> to also disable showing the
                progress dialog.
              </entry>
            </row>
            <row>
              <entry condition="pot">:merge</entry>
              <entry>
                Opens the merge dialog. The <option>/path</option> specifies the
                target directory.
                For merging a revision range, the following options are available:
                <option>/fromurl:URL</option>,
                <option>/revrange:string</option>.
                For merging two repository trees, the following options are available:
                <option>/fromurl:URL</option>,
                <option>/tourl:URL</option>,
                <option>/fromrev:xxx</option> and
                <option>/torev:xxx</option>.
              </entry>
            </row>
            <row>
              <entry condition="pot">:mergeall</entry>
              <entry>
                Opens the merge all dialog. The <option>/path</option> specifies the
                target directory.
              </entry>
            </row>
            <row>
              <entry condition="pot">:copy</entry>
              <entry>
                Brings up the branch/tag dialog.
                The <option>/path</option>
                is the working copy to branch/tag from.
                And the <option>/url</option> is the
                target URL. If the urls starts with a <literal>^</literal> it is assumed
                to be relative to the repository root.
                To already check the option
                <literal>Switch working copy to new branch/tag</literal> you can pass
                the <option>/switchaftercopy</option> switch. To check the option
                <literal>Create intermediate folders</literal> pass the <option>/makeparents</option> switch.
                You can also specify the <option>/logmsg</option> switch
                to pass a predefined log message to the branch/tag dialog.
                Or, if you don't want to pass the log message on the
                command line, use <option>/logmsgfile:path</option>,
                where <option>path</option>
                points to a file containing the log message.
              </entry>
            </row>
            <row>
              <entry condition="pot">:settings</entry>
              <entry>
                Opens the settings dialog.
              </entry>
            </row>
            <row>
              <entry condition="pot">:remove</entry>
              <entry>
                Removes the file(s) in <option>/path</option> from
                version control.
              </entry>
            </row>
            <row>
              <entry condition="pot">:rename</entry>
              <entry>
                Renames the file in <option>/path</option>. The new
                name for the file is asked with a dialog.
                To avoid the question about renaming similar files
                in one step, pass <option>/noquestion</option>.
              </entry>
            </row>
            <row>
              <entry condition="pot">:diff</entry>
              <entry>
                Starts the external diff program specified in the
                TortoiseSVN settings. The <option>/path</option>
                specifies the first file.
                If the option <option>/path2</option>
                is set, then the diff program is started with those
                two files. If <option>/path2</option> is omitted,
                then the diff is done between the file in
                <option>/path</option> and its BASE. If the specified
                file also has property modifications, the external
                diff tool is also started for each modified property.
                To prevent that, pass the option <option>/ignoreprops</option>.
                To explicitly set the revision numbers use
                <option>/startrev:xxx</option> and
                <option>/endrev:xxx</option>, and for the optional
                peg revision use <option>/pegrevision:xxx</option>.
                If <option>/blame</option> is set and <option>/path2</option>
                is not set, then the diff is done by first blaming
                the files with the given revisions.
                The parameter <option>/line:xxx</option> specifies the
                line to jump to when the diff is shown.
              </entry>
            </row>
            <row>
              <entry condition="pot">:shelve</entry>
              <entry>
                Shelves the specified paths in a new shelf.
                The option <option>/shelfname:name</option> specifies the name
                of the shelf. An optional log message can be specified
                with <option>/logmsg:message</option>.
                If option <option>/checkpoint</option> is passed, the
                modifications of the files are kept.
              </entry>
            </row>
            <row>
              <entry condition="pot">:unshelve</entry>
              <entry>
                Applies the shelf with the name <option>/shelfname:name</option>
                to the working copy path. By default the last version of the shelf
                is applied, but you can specify a version with <option>/version:X</option>.
              </entry>
            </row>
            <row>
              <entry condition="pot">:showcompare</entry>
              <entry>
                <para>
                  Depending on the URLs and revisions to compare, this
                  either shows a unified diff (if the option <option>unified</option> is set),
                  a dialog with a list of files that have changed or if
                  the URLs point to files starts the diff viewer for
                  those two files.
                </para>
                <para>
                  The options <option>url1</option>, <option>url2</option>,
                  <option>revision1</option> and <option>revision2</option>
                  must be specified. The options <option>pegrevision</option>,
                  <option>ignoreancestry</option>, <option>blame</option> and
                  <option>unified</option> are optional.
                </para>
                <para>
                  If the specified url also has property modifications, the external
                  diff tool is also started for each modified property.
                  To prevent that, pass the option <option>/ignoreprops</option>.
                </para>
                <para>
                  If a unified diff is requested, an optional <option>prettyprint</option>
                  option can be specified which will show the merge-info properties in
                  a more user readable format.
                </para>
              </entry>
            </row>
            <row>
              <entry condition="pot">:conflicteditor</entry>
              <entry>
                Starts the conflict editor specified in the TortoiseSVN
                settings with the correct files for the conflicted
                file in <option>/path</option>.
              </entry>
            </row>
            <row>
              <entry condition="pot">:relocate</entry>
              <entry>
                Opens the relocate dialog. The <option>/path</option>
                specifies the working copy path to relocate.
              </entry>
            </row>
            <row>
              <entry condition="pot">:help</entry>
              <entry>
                Opens the help file.
              </entry>
            </row>
            <row>
              <entry condition="pot">:repostatus</entry>
              <entry>
                Opens the check-for-modifications dialog. The <option>/path</option>
                specifies the working copy directory. If <option>/remote</option> is
                specified, the dialog contacts the repository immediately on startup,
                as if the user clicked on the <guilabel>Check repository</guilabel> button.
              </entry>
            </row>
            <row>
              <entry condition="pot">:repobrowser</entry>
              <entry>
                <para>
                  Starts the repository browser dialog, pointing to
                  the URL of the working copy given in
                  <option>/path</option> or <option>/path</option>
                  points directly to an URL.
                </para>
                <para>
                  An additional option <option>/rev:xxx</option> can
                  be used to specify the revision which the repository
                  browser should show. If the <option>/rev:xxx</option>
                  is omitted, it defaults to HEAD.
                </para>
                <para>
                  If <option>/path</option> points to an URL, the
                  <option>/projectpropertiespath:path/to/wc</option> specifies
                  the path from where to read and use the project properties.
                </para>
                <para>
                  If <option>/outfile:path\to\file</option> is specified,
                  the selected URL and revision are written to that
                  file when the repository browser is closed.
                  The first line in that text file contains the URL, the
                  second line the revision in text format.
                </para>
              </entry>
            </row>
            <row>
              <entry condition="pot">:ignore</entry>
              <entry>
                Adds all targets in <option>/path</option> to the
                ignore list, i.e. adds the <literal>svn:ignore</literal>
                property to those files.
              </entry>
            </row>
            <row>
              <entry condition="pot">:blame</entry>
              <entry>
                <para>
                  Opens the blame dialog for the file specified
                  in <option>/path</option>.
                </para>
                <para>
                  If the options <option>/startrev</option> and
                  <option>/endrev</option> are set, then the dialog
                  asking for the blame range is not shown but
                  the revision values of those options are used
                  instead.
                </para>
                <para>
                  If the option <option>/line:nnn</option> is set,
                  TortoiseBlame will open with the specified line
                  number showing.
                </para>
                <para>
                  The options <option>/ignoreeol</option>,
                  <option>/ignorespaces</option> and
                  <option>/ignoreallspaces</option> are also supported.
                </para>
              </entry>
            </row>
            <row>
              <entry condition="pot">:cat</entry>
              <entry>
                Saves a file from an URL or working copy path given
                in <option>/path</option> to the location given in
                <option>/savepath:path</option>. The revision is
                given in <option>/revision:xxx</option>. This can
                be used to get a file with a specific revision.
              </entry>
            </row>
            <row>
              <entry condition="pot">:createpatch</entry>
              <entry>
                Creates a patch file for the path given in
                <option>/path</option>. To skip the file Save-As dialog
                you can pass <option>/savepath:path</option> to specify
                the path where to save the patch file to directly.
                To prevent the unified diff viewer from being started showing
                the patch file, pass <option>/noview</option>.
                If a unified diff is requested, an optional <option>prettyprint</option>
                option can be specified which will show the merge-info properties in
                a more user readable format.
              </entry>
            </row>
            <row>
              <entry condition="pot">:revisiongraph</entry>
              <entry>
                <para>
                  Shows the revision graph for the path given in
                  <option>/path</option>.
                </para>
                <para>
                  To create an image file of the revision graph for a specific path, but
                  without showing the graph window, pass <option>/output:path</option>
                  with the path to the output file. The output file must have
                  an extension that the revision graph can actually
                  export to. These are:
                  <literal>.svg</literal>,
                  <literal>.wmf</literal>,
                  <literal>.png</literal>,
                  <literal>.jpg</literal>,
                  <literal>.bmp</literal> and
                  <literal>.gif</literal>.
                </para>
                <para>
                  Since the revision graph has many options that
                  affect how it is shown, you can also set the options
                  to use when creating the output image file.
                  Pass these options with <option>/options:XXXX</option>,
                  where <literal>XXXX</literal> is a decimal value. The best way to
                  find the required options is to start the revision
                  graph the usual way, set all user-interface options and
                  close the graph. Then the options you need to
                  pass on the command line can be read from
                  the registry <literal>HKCU\Software\TortoiseSVN\RevisionGraphOptions</literal>.
                </para>
              </entry>
            </row>
            <row>
              <entry condition="pot">:lock</entry>
              <entry>
                Locks a file or all files in a directory given in
                <option>/path</option>.
                The 'lock' dialog is shown so the
                user can enter a comment for the lock.
              </entry>
            </row>
            <row>
              <entry condition="pot">:unlock</entry>
              <entry>
                Unlocks a file or all files in a directory given in
                <option>/path</option>.
              </entry>
            </row>
            <row>
              <entry condition="pot">:rebuildiconcache</entry>
              <entry>
                Rebuilds the windows icon cache. Only use this in
                case the windows icons are corrupted. A side effect
                of this (which can't be avoided) is that the icons
                on the desktop get rearranged.
                To suppress the message box, pass <option>/noquestion</option>.
              </entry>
            </row>
            <row>
              <entry condition="pot">:properties</entry>
              <entry>
                <para>
                  Shows the properties dialog for the path given in
                  <option>/path</option>.
                </para>
                <para>
                  For dealing with versioned properties this command requires a working copy.
                </para>
                <para>
                  Revision properties can be viewed/changed if <option>/path</option> is an
                  URL and <option>/rev:XXX</option> is specified.
                </para>
                <para>
                  To open the properties dialog directly for a specific
                  property, pass the property name as <option>/property:name</option>.
                </para>
              </entry>
            </row>
            <row>
              <entry condition="pot">:sync</entry>
              <entry>
                <para>
                  Exports/imports settings, either depending on whether the current settings
                  or the exported settings are newer, or as specified.
                </para>
                <para>
                  If a path is passed with <option>/path</option>, then the path is used
                  to store or read the settings from.
                </para>
                <para>
                  The parameter <option>/askforpath</option> will show a file open/save dialog
                  for the user to chose the export/import path.
                </para>
                <para>
                  If neither <option>/load</option> nor <option>/save</option> is specified,
                  then TortoiseSVN determines whether to export or import the settings
                  by looking at which ones are more recent. If the export file is more recent
                  than the current settings, then the settings are loaded from the file. If the
                  current settings are more recent, then the settings are exported to the
                  settings file.
                </para>
                <para>
                  If <option>/load</option> is specified, the settings are imported from the
                  settings file.
                </para>
                <para>
                  If <option>/save</option> is specified, the current settings are exported
                  to the settings file.
                </para>
                <para>
                  The parameter <option>/local</option> forces a settings export
                  to include local settings, i.e. settings that refer to local paths.
                </para>
              </entry>
            </row>
          </tbody>
        </tgroup>
      </table>
    </para>
    <para>
      Examples (which should be entered on one line):
<screen>
TortoiseProc.exe /command:commit
                 /path:"c:\svn_wc\file1.txt*c:\svn_wc\file2.txt"
                 /logmsg:"test log message" /closeonend:0

TortoiseProc.exe /command:update /path:"c:\svn_wc\" /closeonend:0

TortoiseProc.exe /command:log /path:"c:\svn_wc\file1.txt"
                 /startrev:50 /endrev:60 /closeonend:0
</screen>
    </para>
  </sect1>
  <!-- ================================================================= -->
  <!-- ======================== SECTION 1 ============================== -->
  <!-- ================================================================= -->
  <sect1 id="tsvn-automation-urlhandler">
    <title>Tsvncmd URL handler</title>
    <indexterm>
      <primary>automation</primary>
    </indexterm>
    <indexterm>
      <primary>URL handler</primary>
    </indexterm>
    <para>
      Using special URLs, it is also possible to call TortoiseProc from
      a web page.
    </para>
    <para>
      TortoiseSVN registers a new protocol <literal>tsvncmd:</literal> which
      can be used to create hyperlinks that execute TortoiseSVN commands.
      The commands and parameters are the same as when automating TortoiseSVN
      from the command line.
    </para>
    <para>
      The format of the <literal>tsvncmd:</literal> URL is like this:
    </para>
    <para>
      <literal>tsvncmd:command:cmd?parameter:paramvalue?parameter:paramvalue</literal>
    </para>
    <para>
      with <literal>cmd</literal> being one of the allowed commands,
      <literal>parameter</literal> being the name of a parameter like
      <literal>path</literal> or <literal>revision</literal>, and
      <literal>paramvalue</literal> being the value to use for that parameter.
      The list of parameters allowed depends on the command used.
    </para>
    <para>
      The following commands are allowed with <literal>tsvncmd:</literal> URLs:
      <itemizedlist>
        <listitem>
          <literal condition="pot">:update</literal>
        </listitem>
        <listitem>
          <literal condition="pot">:commit</literal>
        </listitem>
        <listitem>
          <literal condition="pot">:diff</literal>
        </listitem>
        <listitem>
          <literal condition="pot">:repobrowser</literal>
        </listitem>
        <listitem>
          <literal condition="pot">:checkout</literal>
        </listitem>
        <listitem>
          <literal condition="pot">:export</literal>
        </listitem>
        <listitem>
          <literal condition="pot">:blame</literal>
        </listitem>
        <listitem>
          <literal condition="pot">:repostatus</literal>
        </listitem>
        <listitem>
          <literal condition="pot">:revisiongraph</literal>
        </listitem>
        <listitem>
          <literal condition="pot">:showcompare</literal>
        </listitem>
        <listitem>
          <literal condition="pot">:log</literal>
        </listitem>
        <listitem>
          <literal condition="pot">:properties</literal>
        </listitem>
      </itemizedlist>
    </para>
    <para>
      A simple example URL might look like this:
<programlisting>
&lt;a href="tsvncmd:command:update?path:c:\svn_wc?rev:1234"&gt;Update&lt;/a&gt;
</programlisting>
            or in a more complex case:
<programlisting>
&lt;a href="tsvncmd:command:showcompare?
url1:https://svn.code.sf.net/p/stefanstools/code/trunk/StExBar/src/setup/Setup.wxs?
url2:https://svn.code.sf.net/p/stefanstools/code/trunk/StExBar/src/setup/Setup.wxs?
revision1:188?revision2:189"&gt;compare&lt;/a&gt;
</programlisting>
    </para>

  </sect1>
  <sect1 id="tsvn-automation-idiff">
    <title>TortoiseIDiff Commands</title>
    <indexterm>
      <primary>automation</primary>
    </indexterm>
    <indexterm>
      <primary>command line</primary>
    </indexterm>
    <para>
      The image diff tool has a few command line options which you
      can use to control how the tool is started.
      The program is called <literal>TortoiseIDiff.exe</literal>.
    </para>
    <para>
      The table below lists all the options which can be passed
      to the image diff tool on the command line.
    </para>
    <!--
ATTENTION ATTENTION ATTENTION ATTENTION ATTENTION ATTENTION ATTENTION ATTENTION
Don't touch these lines:
<entry condition="pot">:about</entry>

  The condition="pot" prevents the strings from being extracted into
    the .pot file, so nobody translates them.
  The colons in front of the command have to stay there to prevent these strings
  from being translated if the po file "by chance" contains a matching translation.
-->
    <para>
      <table id="tsvn-automation-idiff-1-table">
        <title>List of available options</title>
        <tgroup cols="2">
          <colspec colnum="1" colwidth="2*"/>
          <colspec colnum="2" colwidth="6*"/>
          <thead>
            <row>
              <entry>Option</entry>
              <entry>Description</entry>
            </row>
          </thead>
          <tbody>
            <row>
              <entry condition="pot">:left</entry>
              <entry>
                Path to the file shown on the left.
              </entry>
            </row>
            <row>
              <entry condition="pot">:lefttitle</entry>
              <entry>
                A title string. This string is used in the image view
                title instead of the full path to the image file.
              </entry>
            </row>
            <row>
              <entry condition="pot">:right</entry>
              <entry>
                Path to the file shown on the right.
              </entry>
            </row>
            <row>
              <entry condition="pot">:righttitle</entry>
              <entry>
                A title string. This string is used in the image view
                title instead of the full path to the image file.
              </entry>
            </row>
            <row>
              <entry condition="pot">:overlay</entry>
              <entry>
                If specified, the image diff tool switches
                to the overlay mode (alpha blend).
              </entry>
            </row>
            <row>
              <entry condition="pot">:fit</entry>
              <entry>
                If specified, the image diff tool fits both
                images together.
              </entry>
            </row>
            <row>
              <entry condition="pot">:showinfo</entry>
              <entry>
                Shows the image info box.
              </entry>
            </row>
          </tbody>
        </tgroup>
      </table>
    </para>
    <para>
      Example (which should be entered on one line):
<screen>
TortoiseIDiff.exe /left:"c:\images\img1.jpg" /lefttitle:"image 1"
                  /right:"c:\images\img2.jpg" /righttitle:"image 2"
                  /fit /overlay
</screen>
    </para>
  </sect1>
  <sect1 id="tsvn-automation-udiff">
    <title>TortoiseUDiff Commands</title>
    <indexterm>
      <primary>automation</primary>
    </indexterm>
    <indexterm>
      <primary>command line</primary>
    </indexterm>
    <para>
      The unified diff viewer has only two command line options:
    </para>
    <para>
      <table id="tsvn-automation-udiff-1-table">
        <title>List of available options</title>
        <tgroup cols="2">
          <colspec colnum="1" colwidth="2*"/>
          <colspec colnum="2" colwidth="6*"/>
          <thead>
            <row>
              <entry>Option</entry>
              <entry>Description</entry>
            </row>
          </thead>
          <tbody>
            <row>
              <entry condition="pot">:patchfile</entry>
              <entry>
                Path to the unified diff file.
              </entry>
            </row>
            <row>
              <entry condition="pot">:p</entry>
              <entry>
                Activates pipe mode. The unified diff is read from the
                console input.
              </entry>
            </row>
          </tbody>
        </tgroup>
      </table>
    </para>
    <para>
      Examples (which should be entered on one line):
      <screen>
TortoiseUDiff.exe /patchfile:"c:\diff.patch"
      </screen>
      If you create the diff from another command, you can use TortoiseUDiff
      to show that diff directly:
      <screen>
svn diff | TortoiseUDiff.exe /u
      </screen>
      this also works if you omit the <option>/p</option> parameter:
      <screen>
svn diff | TortoiseUDiff.exe
      </screen>
    </para>
  </sect1>
</appendix>
