Environment:Win7
SVN Introduction: Programmers in the process of writing a program, each programmer will generate a lot of different versions, which requires the programmer to effectively manage the code, when needed, can be quickly and accurately remove the corresponding version.
Subversion is a free/open source version control system where a set of files are stored in the central repository, documenting every change in files and directories, Subversion allows data to be restored to an earlier version, or checking the history of data modifications, Subversion can access its repository over the network, allowing users to operate on different computers.
The Visualsvnserver integrates subversion and Apache. Use Visualsvnserver as the server, TORTOISESVN as the client.
Configuration and usage of VISUALSVN server "server Side"
VISUALSVN:http://subversion.apache.org/packages.html
Install after download, always "Next", as shown below
Location refers to the installation directory of the VISUALSVN server, Repositorys is specifying your repository directory, Server port specifies a port, and the use secure connection on the hook indicates a secured connection. Continue to "Next" to "Finish".
After installing VISUALSVN server, run VISUALSVN server Manger, the following is the startup interface:
The right state area includes:
Status: Service Run state
Subversionauthentication: Account Information
Respositories: code Base information
Add a code base "Repository" and choose Create a code base from the right-click menu on the left respositories, such as:
Enter the code base name in the text box shown:
Choose Empty ..., just create the blank code base qgroundstation; If you select Single ... The trunk, branches, tags Three subdirectories are created below the code base qgroundstation.
Select the default option, click Create, and the code base is created successfully.
After the codebase is created, nothing is in it at this time.
Here's how to get into the source code:
Move source code to SVN server
After installing TORTOISESVN, we have already created a project in the 12-21 folder to move the source code of the project into the code base on the SVN server, and use the TortoiseSVN to move in.
Right click on the 12-21 folder, click Import Options,
Pop
Where URL of repository is the root of the code base in SVN server, it's a good habit to write a log in the Information entry box
Clicking the OK button pops up the form below and asks for your credentials. After entering the username password, click the OK button,
, the source code has been successfully checked into the SVN server.
Check out source code to native
In the local Create folder QGroundStation-1221, right click on Checkout, pop up as the form (reference):
Once you have made any changes to the file or folder, the opportunity to display the picture in the file or folder changes.
Note:
A newly checked work copy uses a green checkmark overload to indicate that the subversion status is normal.
After you start editing a file, the state becomes modified, and the icon reload becomes a red exclamation point. In this way, you can easily see that those files have been modified since you last updated the working copy and need to be submitted.
If a conflict occurs during the commit process, the icon becomes a yellow exclamation mark.
The plus sign tells you that a file or directory has been scheduled to be added to version control.
Commit the modified file to the SVN server
Note: When submitting the source code to the server, be sure to ensure that the native code is the latest version, otherwise the submission may fail or cause a version conflict.
Right-click on the QGroundStation-1221 folder or in the empty space in the QGroundStation-1221 folder and click on the SVN Commit ... The following form pops up:
Click the OK button to eject the form as follows:
Click the OK button, the modified file submitted successfully.
Add new files to SVN server
1. Right click on the blank in the folder, click on SVN commit ..., and the above mentioned to commit the modified file to the SVN server, it is OK.
2, you can also right-click on the new file, click Tortoisesvn=>>add, so just submit this file to the "Change list". The file must be committed by VN commit once before it can be actually submitted to the code base on the SVN server.
The steps to add a folder are the same.
Update native code consistent with the latest version on SVN server
Just click on the right button on the folder that needs to be updated or right click on the blank in the file and click on SVN update.
Note: The update operation may fail due to a version conflict, which can be resolved by using merge "merge" or other methods, or it may fail because of locking "Get lock", which requires unlocking "release lock" first.
Rename a file or folder and commit the changes to the SVN server
Right-click on the file/folder that needs to be renamed, click Tortisesvn=>>rename ..., enter the new name in the pop-up form, and click the OK button. This method is not renamed directly, and we use SVN commit to commit to the SVN server before we really rename it.
Delete a file or folder and commit the changes to the SVN server
1. Delete the file or folder directly, then use SVN commit to commit the update to the SVN server.
2, in the File/folder to be deleted right-click, Tortoisesvn=>>delete, this method is not directly deleted, but the state is set to delete, still need to SVN Commit, in the Change list to select the deleted file, after execution is not really deleted.
Description: In fact, from the time you move the source code into the SVN server, each version of the data and files, even if you have deleted, you can always move out.
Security settings
Right-click on the users on the left:
Enter the information above, click OK, we will create a user. According to the above procedure, add the user Developer1, Tester1, manager1 Separately, OK, we start to add these users to the project we just created:
Click on the "Add ..." button in the Select the user we just added, click the OK button:
Note: You may have noticed the groups in, yes, you can also create groups, add users to individual groups, and then authorize groups.
As shown, the user "or group" is authorized separately:
Note: When submitting the source code to the SVN server, be sure not to submit folders such as Bin, obj, or it will be cumbersome. However, except for the bin directory of the Web project, DLLs that are generated by referencing other projects in the Bin directory of the Web project do not need to be committed.
A good habit: if the project references other third-party assemblies, such as Enterpriselibrary, FCKeditor, etc., do not simply reference them from their installation location, but in your solution, add a library directory, Copy the required assemblies here, and then reference them from the library directory.
Reference: http://www.cnblogs.com/armyfai/p/3985660.html
http://jordan-micle.iteye.com/blog/1285604
SVN version Server Setup (service side + client)