Automate Tortoise SVN update in Windows
As a developer you will be experienced with SVN for source control in collaborative development environment. One of the popular clients for SVN in Windows is Tortoise SVN. You can right click in the SVN folder and update the contents of the folder from SVN.
But, when you have a number of SVN folder, will it be a good idea to automate the SVN so that your files are in sync always.
You will need to create a batch (.bat) file for this process.
It is very simple.
Create a batch file in your convenient location.
Edit the file.
Add the location of the TortoiseSVN program path and the SVN folders in your machine as below.
----------------------------------------------------------------------------------
TortoiseProc.exe /command:update /path:"C:\Projects1\dev" /closeonend:1
TortoiseProc.exe /command:update /path:"C:\Projects2\documents" /closeonend:1
TortoiseProc.exe /command:update /path:"C:\Projects2\dev" /closeonend:1
----------------------------------------------------------------------------------
The TortoiseProc.exe is the TortoiseSVN app. It is a GUI app, but will accept command line also. As this is a GUI app, when the batch file is run, it will briefly show the update window and then close after completion of update process. The '/closeonend:1' make this happen. If the value of closeonend is 0, the update window will not be closed automatically.
If you like to run the update at regular intervals, you can use the 'Task Scheduler' of Windows to run this batch file.
But, when you have a number of SVN folder, will it be a good idea to automate the SVN so that your files are in sync always.
You will need to create a batch (.bat) file for this process.
It is very simple.
Create a batch file in your convenient location.
Edit the file.
Add the location of the TortoiseSVN program path and the SVN folders in your machine as below.
----------------------------------------------------------------------------------
TortoiseProc.exe /command:update /path:"C:\Projects1\dev" /closeonend:1
TortoiseProc.exe /command:update /path:"C:\Projects2\documents" /closeonend:1
TortoiseProc.exe /command:update /path:"C:\Projects2\dev" /closeonend:1
----------------------------------------------------------------------------------
The TortoiseProc.exe is the TortoiseSVN app. It is a GUI app, but will accept command line also. As this is a GUI app, when the batch file is run, it will briefly show the update window and then close after completion of update process. The '/closeonend:1' make this happen. If the value of closeonend is 0, the update window will not be closed automatically.
If you like to run the update at regular intervals, you can use the 'Task Scheduler' of Windows to run this batch file.
Comments