Appendix D. TortoiseSVN operations
Directory
-
TortoiseSVN command
-
TortoiseIDiff command
Because all commands use command line parameter control, you can use a specific batch processing script or start from another program (such as your preferred text editor.
Important
Remember that TortoiseSVN is a GUI client. This automated guide shows you how to display and collect customer input in the TortoiseSVN dialog box. If you want to write scripts that do not need to be entered, you should use the official Subversion command line client.
TortoiseSVN command
TortoiseSVN GUI program is calledTortoiseProc.exe. All commands use parameters/command:abcdSpecified, whereabcdIs a required command name. Most of these commands require at least one path parameter./path:"some\path". In the following command table, the command references/command:abcdParameter./path:"some\path"Parameters.
Because some commands require a list of target paths (for example, submitting some specific files ),/pathParameters can receive multiple paths.*Split.
TortoiseSVN uses a temporary file to pass multiple parameters between the shell extension and the main program. From TortoiseSVN 1.5.0, discard/notempfileParameter. You do not need to add this parameter.
The progress dialog which is used for commits, updates and has more commands usually stays open after the command has finished until the user presses the OK 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.
To specify a different location of the configuration file, use the parameter/configdir:"path\to\config\directory". This will override the default path, including any registry setting.
If you want to disable it automatically after the progress dialog box is executed without setting permanent parameters, you can pass/closeonendParameters.
-
/closeonend:0Disable dialog box automatically
-
/closeonend:1If no error occurs, the dialog box is automatically closed.
-
/closeonend:2If no errors or conflicts occur, the dialog box is automatically closed.
-
/closeonend:3If no errors, conflicts, and mergers exist, they are automatically disabled.
-
/closeonend:4If no errors, conflicts, and mergers exist, they are automatically disabled.
The following example lists all commands that can be accessed using tortoiseproc.exe./command:abcdIn the list, because the space-saving relationship is omitted/command.
Table D.1. list of valid commands and options
| Command |
Description |
| : About |
The dialog box is displayed. If the command is not given, it is displayed. |
| : Log |
Open the log dialog box,/pathSpecify the file or directory for displaying logs. You can set the following options:/startrev:xxx,/endrev:xxxAnd/strict |
| : Checkout |
Open the check-out dialog box,/pathThe target path is specified, while/urlThe detected URL is specified. |
| : Import |
Open the import dialog box,/pathSpecifies the data import path. |
| : Update |
Replace/pathUpdate to HEAD. If a parameter is specified/revA dialog box is displayed asking you which version to update. To prevent specified revision versions/rev:1234Dialog box, required/nonrecursiveAnd/ignoreexternals. |
| : Commit |
Open the submit dialog box,/pathSpecify the target path or list of files to be submitted. You can also use the Parameter/logmsgYou can also use/logmsgfile:path,pathPoint to the file that saves the log information. You can use/bugid:"the bug id here"Complete this task. |
| : Add |
Set/pathAdd the file to version control. |
| : Revert |
Recover local modifications to work copies,/pathIndicates which entries are restored. |
| : Cleanup |
Clear the interrupted and terminated operations, and replace/pathUnlock. |
| : Resolve |
Set/pathThe specified file conflict is identified as a solution./noquestionThe solution does not confirm the operation with the user. |
| : Repocreate |
In/pathCreate a version library. |
| : Switch |
Open the option dialog box./pathSpecify the target directory. |
| : Export |
Set/pathTo another directory, if/pathPoint to another version control directory, the dialog box will ask to export/path. |
| : Merge |
Opens the merge dialog./pathSpecifies the target directory. For merging a revision range, the following options are available:/fromurl:URL,/revrange:string. For merging two repository trees, the following options are available:/fromurl:URL,/tourl:URL,/fromrev:xxxAnd/torev:xxx. These pre-fill the relevant fields in the merge dialog. |
| : Mergeall |
Opens the merge all dialog./pathSpecifies the target directory. |
| : Copy |
Brings up the branch/tag dialog./pathIs the working copy to branch/tag from. And/urlIs the target URL. You can also specify/logmsgSwitch 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/logmsgfile:path, WherepathPoints to a file containing the log message. |
| : Settings |
Open the Settings dialog box. |
| : Remove |
Remove from Version Control/path. |
| : Rename |
Rename/pathIn the dialog box, a new file is asked. To prevent similar files from being asked in one step/noquestion. |
| : Diff |
Starts the external diff program specified in the TortoiseSVN settings./pathSpecifies the first file. If the option/path2Is set, then the diff program is started with those two files. If/path2Is omitted, then the diff is done between the file in/pathAnd its BASE. To explicitly set the revision numbers use/startrev:xxxAnd/endrev:xxx. If/blameIs set and/path2Is not set, then the diff is done by first blaming the files with the given revisions. |
| : Showcompare |
Depending on the URLs and revisions to compare, this either shows a uniied diff (if the optionunifiedIs 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.
The optionsurl1,url2,revision1Andrevision2Must be specified. The optionspegrevision,ignoreancestry,blameAndunifiedAre optional. |
| : Conflicteditor |
Starts the conflict editor specified in the TortoiseSVN settings with the correct files for the conflicted file in/path. |
| : Relocate |
Open the relocation dialog box,/pathSpecifies the path of the relocated working copy. |
| : Help |
Open the Help File |
| : Repostatus |
Open the "Modify detection" dialog box,/pathThe working copy directory is specified. |
| : Repobrowser |
Starts the repository browser dialog, pointing to the URL of the working copy given in/pathOr/pathPoints directly to an URL. An additional option/rev:xxxCan be used to specify the revision which the repository browser shocould show. If/rev:xxxIs omitted, it defaults to HEAD. If/pathPoints to an URL,/projectpropertiespath:path/to/wcSpecifies the path from where to read and use the project properties. |
| : Ignore |
Set/pathAdd objects to the ignore list, that is, add these filessvn:ignoreAttribute. |
| : Blame |
Is/pathOption.
If/startrevAnd/endrevOption. The query trace range dialog box is not displayed. Use the version number in these options directly.
If/line:nnnOption, TortoiseBlame will display the specified number of rows.
Also supported/ignoreeol,/ignorespacesAnd/ignoreallspaces. |
| : Cat |
Set/pathSave the specified working copy or URL file/savepath:path, The version number is/revision:xxx. |
| : Createpatch |
Create/path. |
| : Revisiongraph |
Display/pathVersion changes under the directory. |
| : Lock |
Locks a file or all files in a directory given in/path. The 'lock' dialog is shown so the user can enter a comment for the lock. |
| : Unlock |
Unlocks a file or all files in a directory given in/path. |
| : Rebuildiconcache |
Rebuilds the windows icon cache. only use this in case the windows icons are already upted. 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/noquestion. |
| : Properties |
Display/pathThe path Properties dialog box is displayed. |
Examples (which shocould 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:0TortoiseProc.exe /command:update /path:"c:\svn_wc\" /closeonend:0TortoiseProc.exe /command:log /path:"c:\svn_wc\file1.txt" /startrev:50 /endrev:60 /closeonend:0