Svn usage (1)

Source: Internet
Author: User
Tags tortoisesvn

Svn usage (1)
1. Install the svn server (centos)
Yum install subversion
You can run the subversion-v command to check whether the installation is successful.
If no subversion command is prompted, it is because we still need to create the svn library.
Run the following command:
Mkdir-p/svn/repos
Svnadmin create/svn/repos
Cd/svn/repos
Ls
You can see many more files and folders: conf db format hooks locks README.txt
The installation of the svn server is complete.
Ii. svn Configuration
Cd/svn/repos/conf
Ls
You can see the file authz passwd svnserve. conf.
1. First configure the passwd file
Vi passwd
Add similar account
M0sh1 = admin
# Username = Password
Save and exit
2. Configure the authz File
Add content
[/]
M0sh1
# These two statements indicate that the user m0sh1 has access permissions to the entire directory (you can set more detailed directory permissions on your own)
3. Configure svnserve. conf
Anon-access = none # Make unauthorized users inaccessible
Auth-access = write # grant the authorized user the write permission
Password-db = password # password File
Authz-db = authz # access control file
Realm = m0sh1Svn
Use the default configuration. The above statements must be written in the top level, and no space is left. Otherwise, an error will occur.
3. Start the service for testing
Start svn
Svnseve-d-r/svn/repos
# If you want to create another svn instance, you can set different ports to solve this problem.
Svnseve-d-r/svn/repos2 -- listen-port 3313
After the startup is successful, we can connect to the local TortoiseSVN (TortoiseSVN can be searched and downloaded by ourselves)
Svn link:
Svn: // server address (if the specified port needs to be added: port number)
4. Create a project
1. You can run commands directly on the server where the svn server is located.
Svn improt project import project
Svn add file (directory)
2. Use TortoiseSVN in windows to select the project directory, right-click import, and leave a message for submission.
3. In windows, right-click the new directory, select checkout, copy the project file to this directory, and right-click commit (leave message)
V. svn version management
The SVN structure is generally as follows:
Svn: // your project
+ Trunk/
App/
Lib /...
+ Branches/
+ Braches_1.0/
+ Tags
+ Tag_release_1.0
When there is a development requirement, branch is performed on the trunk (trunk). When the development of a branch is completed, the test should be correct.
Merge to the trunk. If there is a problem with the trunk, you can make some modifications in the trunk. When a phase is completed, there is a stable project that can be released
You can create a tag.
The trunk should always be a stable version, and developers in the branch development should often synchronize with trunk (trunk merge to branch
This will not change the trunk code), otherwise you will get farther and farther away from the trunk version. When the branches are merged to the trunk, they must be carefully tested before they can be submitted to the commit.
(But the commit should be implemented as soon as possible to prevent others from modifying the trunk)
Of course, the overall process should be set based on the actual situation. Svn merge can search for related materials separately. ^ _ ^

Next, we will briefly summarize the usage of svn hook.
For example, the above assumption is a web project, trunk update, and the web Test server also updates the trunk code.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.