There is no doubt about the role of Svn in team development. I have several years of experience in using it, and I feel that it is easy to use.
However, some complicated and automated SVN operations can be performed in batches to make SVN more powerful.
Share 1: Update multiple discrete SVN directories.
When you do not want to update the entire root directory, or do not have the permissions of the entire root directory, and you need to update it frequently, You need to click a folder to update the operation. It is complicated to imagine. We can write a simple. BAT file to perform this operation. As follows:
"C:/program files/tortoisesvn/bin/tortoiseproc.exe" is the local SVN installation directory. Note that double quotation marks are required because the path C:/program files/contains spaces.
/Command: update is the svn update command.
/Path: "F:/a/B/" is the directory to be updated.
/Closeonend: 0 indicates the operation Terminator.
The above. Bat executes two update operations, and two SVN update interfaces will pop up. You can use the following method to update two directories on the svn interface.
/Path: "F:/a/B/* F:/C/D/e.txt" as shown above, you can use * to connect two paths to update multiple directories on the same interface.
Share 2: Submit multiple discrete SVN directories.
Recently, both planning and art complained about the files to be submitted and directories to be submitted after editing the scenario. Therefore, the scenario editor provides the one-click submission function, automatically checks the status of files in the directories to be submitted. The specific implementation is as follows.
If you submit a file that has not been included in the SVN version control, first run the Add command and change the above/command: Update to/command: Add. Then, execute the file submission operation and change the above/command: Update to/command: commit.
Whether it is "add" or "commit", a SVN confirmation box is displayed to list the files that need to be added or commit in the current directory. If a file does not need to be operated, you can select the check box before the file list, and then press OK to submit the operation to the svn server.
You can also set the default commit log during commit, for example:
/Logmsg: the subsequent string is the default log information. You can also modify it on the svn confirmation and submission page.
Share 3: Hide the CMD window.
This function does not belongSVNCommand scope, but now that we are talking about batch processing, let's share it with you. The implementation is very simple.. BatAdd an identifier to the beginning of the file as follows:
In this way, the black window does not appear every time the. BAT file is executed.
In fact, the batch processing functions are quite powerful.