Daftar Isi
Karena semua perintah TortoiseSVN dikontrol melalui parameter baris perintah, Anda bisa mengotomasinya dengan naskah batch atau memulai perintah dan dialog tertentu dari program lain (contoh. editor teks favorit Anda).
Ingat bahwa TortoiseSVN adalah klien GUI, dan petunjuk otomasi ini memperlihatkan kepada Anda bagaimana untuk membuat dialog TortoiseSVN muncul untuk mengumpulkan input pengguna. Jika Anda ingin menulis naskah yang tidak memerlukan input, sebaliknya Anda harus menggunakan klien baris perintah Subversion resmi.
Program GUI TortoiseSVN dipanggil TortoiseProc.exe
. Semua perintah ditetapkan dengan parameter /command:abcd
dimana abcd
adalah nama perintah yang diperlukan. Kebanyakan dari perintah ini membutuhkan setidaknya satu argumen path, yang diberikan dengan /path:"some\path"
. Dalam tabel berikut perintah merujuk ke parameter /command:abcd
dan the path merujuk ke parameter /path:"some\path"
.
There's a special command that does not require the parameter /command:abcd
but, if nothing is specified on the command line, starts the project monitor instead. If /tray
is specified, the project monitor starts hidden and only adds its icon to the system tray.
Karena beberapa perintah bisa mengambil daftar path sasaran (contoh, mengkomit beberapa file tertentu) parameter /path
bisa mengambil beberapa path, dipisahkan dengan karakter *
.
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 BOM. 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 /deletepathfile
. 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 the
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.
To close the progress dialog at the end of a command automatically without using the permanent setting you can pass the /closeonend
parameter.
/closeonend:0
jangan tutup dialog secara otomatis
/closeonend:1
otomatis tutup jika tidak ada kesalahan
/closeonend:2
otomatis tutup jika tidak ada kesalahan dan konflik
/closeonend:3
otomatis tutup jika tidak ada kesalahan, konflik dan gabungan
To close the progress dialog for local operations if there were no errors or conflicts, pass the /closeforlocal
parameter.
Tabel berikut mendaftarkan semua perintah yang bisa diakses menggunakan baris perintah TortoiseProc.exe. Seperti dijelaskan di atas, ini harus digunakan dalam bentuk /command:abcd
. Dalam tabel, prefiks /command
dihilangkan untuk menghemat ruang.
Tabel D.1. Daftar perintah dan opsi yang tersedia
Perintah | Deskripsi |
---|---|
:about | Shows the about dialog. This is also shown if no command is given. |
:log |
Opens the log dialog. The
An svn date revision can be in one of the following formats:
|
:checkout |
Opens the checkout dialog. The If you specify |
:import | Opens the import dialog. The /path specifies the directory with the data to import. You can also specify the /logmsg 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 /logmsgfile:path , where path points to a file containing the log message. |
:update | Updates the working copy in /path to HEAD. If the option /rev 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 /rev:1234 . Other options are /nonrecursive , /ignoreexternals and /ignoreexternals . The /stickydepth indicates that the specified depth should be sticky, creating a sparse checkout. The /skipprechecks can be set to skip all checks that are done before an update. If this is specified, then the Show log button is disabled, and the context menu to show diffs is also disabled after the update. |
:commit | Opens the commit dialog. The /path specifies the target directory or the list of files to commit. You can also specify the /logmsg 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 /logmsgfile:path , where path 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 /bugid:"id bug disini" to do that. |
:add | Menambah file dalam /path ke kontrol versi. |
:revert | Mengembalikan perubahan lokal dari copy pekerjaan. /path memberitahu item mana yang dikembalikan. |
:cleanup | Cleans up interrupted or aborted operations and unlocks the working copy in /path . You also have to pass the /cleanup to actually do the cleanup. Use /noui to prevent the result dialog from popping up (either telling about the cleanup being finished or showing an error message). /noprogressui also disables the progress dialog. /nodlg 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 /cleanup for status cleanup, /breaklocks to break all locks, /revert to revert uncommitted changes, /delunversioned , /delignored , /refreshshell , /externals , /fixtimestamps and /vacuum . |
:resolve | Menandai file yang konflik yang ditetapkan dalam /path sebagai terselsaikan. Jika /noquestion diberikan, maka penyelesaian dikerjakan tanpa menanyakan pengguna terlebih dulu jika itu benar-benar harus dilakukan. |
:repocreate | Membuat repositori dalam /path |
:switch | Opens the switch dialog. The /path specifies the target directory and /url the URL to switch to. |
:export | Exports the working copy in /path to another directory. If the /path points to an unversioned directory, a dialog will ask for an URL to export to the directory in /path . If you specify the key /blockpathadjustments , the automatic export path adjustments are blocked. |
:dropexport | Exports the working copy in /path to the directory specified in /droptarget . This exporting does not use the export dialog but executes directly. The option /overwrite specifies that existing files are overwritten without user confirmation, and the option /autorename specifies that if files already exist, the exported files get automatically renamed to avoid overwriting them. The option /extended can specify either localchanges to only export files that got changed locally, or unversioned to also export all unversioned items as well. |
:dropvendor | Copies the folder in /path recursively to the directory specified in /droptarget . 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 /noui to skip the confirmation dialog, and /noprogressui to also disable showing the progress dialog. |
:merge | Opens the merge dialog. The /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 . |
:mergeall | Opens the merge all dialog. The /path specifies the target directory. |
:copy | Brings up the branch/tag dialog. The /path is the working copy to branch/tag from. And the /url is the target URL. If the urls starts with a ^ it is assumed to be relative to the repository root. To already check the option Switch working copy to new branch/tag you can pass the /switchaftercopy switch. To check the option Create intermediate folders pass the /makeparents switch. You can also specify the /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 , where path points to a file containing the log message. |
:settings | Membuka dialog seting. |
:remove | Menghapus file dalam /path dari kontrol versi. |
:rename | Mengganti nama file dalam in /path . Nama baru untuk file yang ditanyakan dengan dialog. Untuk menghindari pertanyaan mengenai penggantian nama yang mirip dalam satu langkah, operkan /noquestion . |
:diff | Starts the external diff program specified in the TortoiseSVN settings. The /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. 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 /ignoreprops . To explicitly set the revision numbers use /startrev:xxx and /endrev:xxx , and for the optional peg revision use /pegrevision:xxx . If /blame is set and /path2 is not set, then the diff is done by first blaming the files with the given revisions. The parameter /line:xxx specifies the line to jump to when the diff is shown. |
:shelve | Shelves the specified paths in a new shelf. The option /shelfname:name specifies the name of the shelf. An optional log message can be specified with /logmsg:message . If option /checkpoint is passed, the modifications of the files are kept. |
:unshelve | Applies the shelf with the name /shelfname:name to the working copy path. By default the last version of the shelf is applied, but you can specify a version with /version:X . |
:showcompare |
Depending on the URLs and revisions to compare, this either shows a unified diff (if the option The options 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 If a unified diff is requested, an optional |
:conflicteditor | Starts the conflict editor specified in the TortoiseSVN settings with the correct files for the conflicted file in /path . |
:relocate | Membuka dialog relokasi. /path menetapkan path copy pekerjaan untuk direlokasi. |
:help | Membuka file bantuan. |
:repostatus | Opens the check-for-modifications dialog. The /path specifies the working copy directory. If /remote is specified, the dialog contacts the repository immediately on startup, as if the user clicked on the Check repository button. |
:repobrowser |
Starts the repository browser dialog, pointing to the URL of the working copy given in An additional option If If |
:ignore | Adds all targets in /path to the ignore list, i.e. adds the svn:ignore property to those files. |
:blame |
Opens the blame dialog for the file specified in If the options If the option The options |
:cat | Menyimpan file dari URL atau path copy pekerjaan yang diberikan dalam /path ke lokasi yang diberikan dalam /savepath:path . Revisi diberikan dalam /revision:xxx . Ini bisa digunakan untuk memperoleh file dengan revisi tertentu. |
:createpatch | Creates a patch file for the path given in /path . To skip the file Save-As dialog you can pass /savepath:path 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 /noview . If a unified diff is requested, an optional prettyprint option can be specified which will show the merge-info properties in a more user readable format. |
:revisiongraph |
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 |
: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 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 /noquestion . |
:properties |
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 |
:sync |
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 The parameter If neither If If The parameter |
Contoh (yang harus dimasukkan pada satu baris):
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