Use svn to build a server on Mac and use idea for connection.
1. Check the SVN version number that comes with Mac. 2. create a code repository $ mkdir-p/Users/Shared/svn/repository $ svnadmin create/Users/Shared/svn/repository to create a code repository: the first command is to create a repository file directory, which is used to the storage path./svn parent path/svn/Repository name. Note: The repository name cannot contain Arabic numbers. The second command is to initialize the repository. After executing the second command, the repository will have more configuration files. 3. modify the configuration file 1. Configure svn user permissions to modify the three files in the/svn/mycode/conf directory 1. Open svnserve. conf and# Remove both space and space# Anon-access = read # auth-access = write # password-db = passwd # authz-db = authz after modification: anon-access = read indicates that anonymous access is read-only. If you change to anon-access = none, anonymous access is forbidden. You need an account password to access the service. open passwd and add the account and password under [users,No space before a rowFor example, account zs and password: 1234563. open authz and configure user groups and permissions. We can assign users added in passwd to different user groups. In the future, we can set different permissions for different user groups, there is no need to set permissions for each user separately. Add the group name and user name under [groups]. Multiple users are separated by commas,No space before the row
[groups]
topgroup=mj,jj
It indicates that both mj and jj belong to the topgroup, and then Configure permissions. Use [/] to represent all the resources in the svn server [java] view plain copy
[/]
@topgroup = rw
The configuration above indicates that all users in the topgroup have the read and write permissions on all resource libraries. The group name must be preceded @, for example, mj users have read and write permissions.
[/]
mj = rw
For other fine-grained permission control, refer to other content in the authz file. 4. if so many configurations are configured before starting the svn server, the most important thing is to check whether the server can be started normally. If the server cannot be started, it is futile to do more work before. Run the following command on the terminal: svnserve-d-r/Users/Shared/svn. If no prompt is displayed, the startup is successful. if you want to disable the svn server, the most effective way is to open the "activity monitor" in the utility"
Based on the above, we can easily build the svn server environment by using terminal commands for creating the svn Repository:
$ mkdir -p /Users/Shared/svn/repository
$ svnadmin create /Users/Shared/svn/repository/
$ cd /Users/Shared/svn/repository/
$ ls
README.txt db hooks
conf format locks
$ cd conf/
$ ls
authz hooks-env.tmpl passwd svnserve.conf
$ vi svnserve.conf
$ vi passwd
$ vi authz
$ svnserve -d -r /Users/Shared/svn
4. Use Cornerstone 3 to connect to the local SVN Repository
When the "success" pop-up window is displayed, the page jumps to the homepage, indicating that the connection is successful;
5. Use idea to connect to the svn repository 1. Configure svn
2. Connect to the svn Repository
Connection successful 3. The code is submitted for the first time. In the displayed window, select the project folder to be submitted and submit it to the repository. Right-click the project to view the svn version related content, submit for updates, and so on. 4. Export a project