Configuration of SVN server under MAC environment

Source: Internet
Author: User
Tags svn svn client svn update

Configuration of svn server under MAC Environment

Directory of this document

? Create a code warehouse to store the code uploaded by the client

? Ii. Configuring user rights for SVN

? Third, use the SVN client function

In a Windows environment, we typically use TORTOISESVN to build an SVN environment. In a Mac environment, because the Mac comes with SVN's server-side and client features, we can use SVN without any third-party software, but we need to do a simple configuration.

Let's start by looking at how to build an SVN server-side environment in a MAC environment.

Create a code warehouse to store the code uploaded by the client

I now/users/apple (my user name)/desktop/(desktop) manually to create a directory called SVN, in the future can be in the SVN directory to create multiple warehouse directories, open the terminal, create a code warehouse

Library, input directive:svnadmin Create /users/apple/desktop/svn/code

After successful execution of the above instructions, you will find that there is a/users/apple/desktop/svn/code on the disk, the directory structure is as follows:

Second, the configuration SVN permissions mainly modify the svn/code/conf directory of three

File

1. Open the svnserve.confand remove the # and spaces in front of the following configuration items

# anon-access = Read
# auth-access = Write

# password-db = passwd

# authz-db = Authz

Anon-access = Read on behalf of anonymous access, if you change to anon-access = None means anonymous access is forbidden, the account password is required to access

2. Open passwdand add the account and password under [users] [users]

Lyc=lyc123 mars=liyc123 account number is LYC, password is lyc123

3. Open Authz, configure user groups and permissions we can add users in the passwd to different groups of users, later, you can set different permissions for different groups of users, there is no need for each user to set permissions individually.

Add a group name and user name under [groups], separated by commas (,) between multiple users [groups] Topgroup=lyc,mars

LYC and lyc123 are all belong to topgroup this group, then the permission configuration.

Use [/] to represent all repositories in the SVN server

[/] @topgroup =RW

The above configuration instructions Topgroup all the users in this group have read and write (rw) permissions to all repositories, the group name is preceded by @, if it is a user name, do not add @, such as LYC this user has read and write permissions

[/] Lyc=rw

For other fine-grained permission controls, you can refer to other content in the Authz file

4. start the svn server

The front configuration is so much, the key is to see

Can start the server normally, if the start does not come, before doing more work is futile. Enter the following command at the terminal:

svnserve-d-R /users/apple/desktop/svn or input:

svnserve-d-R /users/apple/desktop/svn/code without any hint, it means the boot was successful.

5. Close the SVN server to find the activity monitor from inside the application, enter SVN in the upper right corner,

Such as

Double-click the running SVN server and a box will pop up,

Click Exit.

third, the use SVN Client Features

1. Import code from local to server ( First initialize import )

Enter in the terminal

SVN Import/users/apple/desktop/uilabeldemo (the file name to import) Svn://localhost/mycode/svn_project (manually to create) --username=lyc--password=lyc123-m " Initialize Import "

I explain what the instruction means: upload everything from /users/liyuechun/desktop/uilabeldemo(the file name to be imported) to the server code repository svn_ Project(manually go to create) directory, followed by "Initialize import" in double quotes is a comment

2. Download the code from the server side to the client local

Enter svn checkout Svn://localhost/mycode--username=lyc--password=lyc123/users/apple/desktop/projectfromsvc in the terminal (manually to create)

I explain the instructions: Download the contents of the code repository in the server to the /users/apple/desktop/projectfromsvc directory

3. Commit the changed code to the server

In step 2, the server-side code has been downloaded to the /users/apple/desktop/projectfromsvc directory, now modify some of the code inside, and then commit these modifications to the server

1> Open terminal, first locate to /users/apple/desktop/projectfromsvc directory, enter:cd/users/apple/desktop/projectfromsvc

2> Input Submission Instructions:svn commit-m " modified main.m file "

This command will synchronize all changes under /users/apple/desktop/projectfromsvc to the server side, if I only modified the main file this time.

You can see the print information for the terminal:

Sending transmitting file data.

Committed Revision 2.

4. Update the server-side code to the client

This should be the simplest instruction, in the terminal to locate the client code directory, such as the above projectfromsvc directory, and then enter the command:SVN update

5. for Other uses of SVN, you can enter in the terminal:svn help

Here's a bunch of SVN instructions, and the rest of the parentheses will generally represent the abbreviation of the instruction, for example, we can use SVN ci instead of SVN commit and SVN co instead of SVN checkout

Configuration of SVN server under MAC environment

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.