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:abcd
Specified, whereabcd
Is 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:abcd
Parameter./path:"some\path"
Parameters.
Because some commands require a list of target paths (for example, submitting some specific files ),/path
Parameters 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/notempfile
Parameter. 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/closeonend
Parameters.
/closeonend:0
Disable dialog box automatically
/closeonend:1
If no error occurs, the dialog box is automatically closed.
/closeonend:2
If no errors or conflicts occur, the dialog box is automatically closed.
/closeonend:3
If no errors, conflicts, and mergers exist, they are automatically disabled.
/closeonend:4
If no errors, conflicts, and mergers exist, they are automatically disabled.
The following example lists all commands that can be accessed using tortoiseproc.exe./command:abcd
In 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,/path Specify the file or directory for displaying logs. You can set the following options:/startrev:xxx ,/endrev:xxx And/strict |
: Checkout |
Open the check-out dialog box,/path The target path is specified, while/url The detected URL is specified. |
: Import |
Open the import dialog box,/path Specifies the data import path. |
: Update |
Replace/path Update to HEAD. If a parameter is specified/rev A dialog box is displayed asking you which version to update. To prevent specified revision versions/rev:1234 Dialog box, required/nonrecursive And/ignoreexternals . |
: Commit |
Open the submit dialog box,/path Specify the target path or list of files to be submitted. You can also use the Parameter/logmsg You can also use/logmsgfile:path ,path Point to the file that saves the log information. You can use/bugid:"the bug id here" Complete this task. |
: Add |
Set/path Add the file to version control. |
: Revert |
Recover local modifications to work copies,/path Indicates which entries are restored. |
: Cleanup |
Clear the interrupted and terminated operations, and replace/path Unlock. |
: Resolve |
Set/path The specified file conflict is identified as a solution./noquestion The solution does not confirm the operation with the user. |
: Repocreate |
In/path Create a version library. |
: Switch |
Open the option dialog box./path Specify the target directory. |
: Export |
Set/path To another directory, if/path Point to another version control directory, the dialog box will ask to export/path . |
: Merge |
Opens the merge dialog./path Specifies 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:xxx And/torev:xxx . These pre-fill the relevant fields in the merge dialog. |
: Mergeall |
Opens the merge all dialog./path Specifies the target directory. |
: Copy |
Brings up the branch/tag dialog./path Is the working copy to branch/tag from. And/url Is the target URL. You can also specify/logmsg 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/logmsgfile:path , Wherepath Points to a file containing the log message. |
: Settings |
Open the Settings dialog box. |
: Remove |
Remove from Version Control/path . |
: Rename |
Rename/path In 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./path Specifies the first file. If the option/path2 Is set, then the diff program is started with those two files. If/path2 Is omitted, then the diff is done between the file in/path And its BASE. To explicitly set the revision numbers use/startrev:xxx And/endrev:xxx . If/blame Is set and/path2 Is 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 optionunified 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. The optionsurl1 ,url2 ,revision1 Andrevision2 Must be specified. The optionspegrevision ,ignoreancestry ,blame Andunified Are 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,/path Specifies the path of the relocated working copy. |
: Help |
Open the Help File |
: Repostatus |
Open the "Modify detection" dialog box,/path The working copy directory is specified. |
: Repobrowser |
Starts the repository browser dialog, pointing to the URL of the working copy given in/path Or/path Points directly to an URL. An additional option/rev:xxx Can be used to specify the revision which the repository browser shocould show. If/rev:xxx Is omitted, it defaults to HEAD. If/path Points to an URL,/projectpropertiespath:path/to/wc Specifies the path from where to read and use the project properties. |
: Ignore |
Set/path Add objects to the ignore list, that is, add these filessvn:ignore Attribute. |
: Blame |
Is/path Option. If/startrev And/endrev Option. The query trace range dialog box is not displayed. Use the version number in these options directly. If/line:nnn Option, TortoiseBlame will display the specified number of rows. Also supported/ignoreeol ,/ignorespaces And/ignoreallspaces . |
: Cat |
Set/path Save the specified working copy or URL file/savepath:path , The version number is/revision:xxx . |
: Createpatch |
Create/path . |
: Revisiongraph |
Display/path Version 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/path The 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