Build SVN server and Xcode config svn under Mac

Source: Internet
Author: User
Tags aliases svn client

http://www.cnblogs.com/iihe602/p/3277735.htmlbuild SVN server and Xcode config svn under MacCategory: IOS2013-01-14 14:36 5781 People read comments (0) favorite reports

Build SVN server and Xcode config svn under Mac

Open the command line terminal first.

1. Create SVN repository

Svnadmin create/yourpath/svnroot/repository

2. Configure SVN user rights.

There are 3 files in the/yourpath/svnroot/repository/conf/directory:

Authz,passwd,svnserve.conf.

1) svnserve.conf:

will be inside the

# anon-access = Read

# auth-access = Write

# password-db = passwd

......

# authz-db = Authz

The # number before four lines is removed, then anon-access = read to Anon-access = None (anonymous access is forbidden, if not changed, there will be unreadable log, such as on the Mac with the versions software, can not read the timeline timeline ). After the # number there are spaces, you have to remove, so that the text shelf.

If you do not use authz-db = Authz, you do not need to remove the # number of the line, and you do not need to configure the 3rd step of the Authz file.

The following changes are followed:

Anon-access = Read

Anon-access = None

auth-access = Write

Password-db = passwd

......

Authz-db = Authz

2) passwd:

Add user name and password by example

# # # This file was an example password Filefor svnserve.

# # # Its format was similar to that ofsvnserve.conf. As shown in the

# # # example below it contains one sectionlabelled [users].

# # # The name and password for each userfollow, one account per line.

[Users]

Harry = Harryssecret

Sally = Sallyssecret

3) Authz:

# # # This file is a example authorizationfile for Svnserve.

# # # Its format was identical to that OFMOD_AUTHZ_SVN authorization

# # files.

# # as shown below each sections definesauthorizations for the path and

# # # (optional) repository specified by thesection name.

# # # The authorizations follow. Anauthorization Line can refer to:

# # #-a single user,

# # #-a group of users defined in a special [groups] sections,

# # #-an alias defined in a special [aliases] section,

# # #-All authenticated users, using the ' $authenticated ' token,

# # #-Only anonymous users, using the ' $anonymous ' token,

# # #-anyone, using the ' * ' wildcard.

###

# # # A match can is inverted by prefixingthe rule with ' ~ '. Rules can

# # # Grant Read (' R ') access, read-write (' RW ') access, or no access

### (‘‘).

[Aliases]

# Joe =/c=xz/st=dessert/l=snakecity/o=snake oil, ltd./ou=research Institute/cn=joe Average

[Groups]

Harry_and_sally =harry,sally

# Harry_sally_and_joe =harry,sally,&joe

# [/foo/bar]

# Harry = RW

# &joe = R

# * =

# # # for permission settings for all repositories [/]

# # # Group name before you add @, user name does not add.

* = is for everyone to set permissions, here is set all other people do not have read and write permissions.

[/]

@harry_and_sally = RW

* =

# [Repository:/baz/fuz]

# @harry_and_sally = RW

# * = R

3, start the server.

Svnserve-d-r/yourpath/svnroot/repository

Without any hint, the boot was successful.

4. Import the project into the SVN repository.

SVN import/projectpathyouneedtoimport/svn://localhost/svnroot/respository/projectname--username Username-- Password Password-m "comment Information"

5. Export the project

SVN checkout Svn://localhost/svnroot/respository/projectname--username=username--password=password/ thepathcheckoutto/

6, if it is another machine to do the server, you need to replace localhost with the server path.

You can edit the following file to add a name-to-IP-address mapping.

sudo vi/etc/hosts

If you add a red section

##

# Host Database

#

# localhost is used to configure Theloopback interface

# when the system is booting. Don't change the This entry.

##

127.0.0.1 localhost

255.255.255.255 Broadcasthost

:: 1 localhost

Fe80::1%lo0 localhost

192.168.14.1 Svnip

7. Useful commands

SVN ls svn://svnip/svnpath can query SNV warehouse contents

Lsof-i: 3690 See if SVN starts

PS aux | grep ' svn ' finds all SVN-initiated process IDs

The kill-9 PID replaces the PID with the process ID found above to kill the SVN process

8. Xcode Configuration svn

1) Open Xcode

2) Open Organizer, in the lower left corner + number, point addrepository ...

3) in the Popup interface:

Name can be random, location input is svn://svnip/svnpath/projectname (path name, etc.), follow the instructions to complete.

4) point organizer, in the lower left corner + number, point Checkoutor Clone Repository ...

5) in the Popup interface:

Location input svn://svnip/svnpath/projectname, click Checkout, select the path you want to save in the popup screen.

This will be a local to get a copy of the SVN server project, you can modify, update, commit the code (update the commit operation under the Xcode menu-->[file]-->[source Control]).

Xcode's own SVN management features often go wrong with update and cimmit, and I don't know if I'm using the wrong way. Therefore, it is particularly recommended that an SVN client tool, versions, feels much better than the SVN client and SVN x client that comes with Xcode.

Http://www.versionsapp.com

Build SVN server and Xcode config svn under Mac

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.