Table of Contents
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).
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.
The TortoiseSVN GUI program is called
All commands are specified with the parameter
abcd is the required command name. Most of these
commands need at least one path argument, which is given with
/path:"some\path". In the following table the command
refers to the
/command:abcd parameter and the path
refers to the
There's a special command that does not require the parameter
but, if nothing is specified on the command line, starts the project monitor instead.
/tray is specified, the project monitor starts hidden and only
adds its icon to the system tray.
Since some of the commands can take a list of target paths (e.g. committing
several specific files) the
/path parameter can take
several paths, separated by a
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
If you pass such a file, use
/pathfile instead of
/path. To have TortoiseProc delete that file after
the command is finished, you can pass the parameter
If you don't pass
/deletepathfile, you have to delete the file
yourself or the file gets left behind.
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 thebutton. 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.
To specify a different location of the configuration file, use the parameter
This will override the default path, including any registry setting.
To close the progress dialog at the end of a command automatically without
using the permanent setting you can pass the
/closeonend:0 don't close the dialog automatically
/closeonend:1 auto close if no errors
/closeonend:2 auto close if no errors and conflicts
/closeonend:3 auto close if no errors, conflicts and merges
To close the progress dialog for local operations if there were no
errors or conflicts, pass the
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
In the table, the
/command prefix is omitted
to save space.
Table D.1. List of available commands and options
|:about||Shows the about dialog. This is also shown if no command is given.|
Opens the log dialog. The
An svn date revision can be in one of the following formats:
Opens the checkout dialog. The |
Opens the import dialog. The |
Updates the working copy in |
Opens the commit dialog. The |
Adds the files in |
Reverts local modifications of a working copy.
Cleans up interrupted or aborted operations and
unlocks the working copy in |
Marks a conflicted file specified in
Creates a repository in |
Opens the switch dialog. The |
Exports the working copy in |
Exports the working copy in |
Copies the folder in |
Opens the merge dialog. The |
Opens the merge all dialog. The |
Brings up the branch/tag dialog.
|:settings||Opens the settings dialog.|
Removes the file(s) in |
Renames the file in |
Starts the external diff program specified in the
TortoiseSVN settings. The |
Depending on the URLs and revisions to compare, this
either shows a unified diff (if the option
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
Starts the conflict editor specified in the TortoiseSVN
settings with the correct files for the conflicted
file in |
Opens the relocate dialog. The |
|:help||Opens the help file.|
Opens the check-for-modifications dialog. The |
Starts the repository browser dialog, pointing to
the URL of the working copy given in
An additional option
Adds all targets in |
Opens the blame dialog for the file specified
If the options
If the option
Saves a file from an URL or working copy path given
Creates a patch file for the path given in
Shows the revision graph for the path given in
To create an image file of the revision graph for a specific path, but
without showing the graph window, pass
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
Locks a file or all files in a directory given in
Unlocks a file or all files in a directory given in
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 |
Shows the properties dialog for the path given in
For dealing with versioned properties this command requires a working copy.
Revision properties can be viewed/changed if
To open the properties dialog directly for a specific
property, pass the property name as
Exports/imports settings, either depending on whether the current settings or the exported settings are newer, or as specified.
If a path is passed with
Examples (which should be entered on one line):
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