VISUALSVN Server configuration and use with NetBeans

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

1, install VISUALSVN Server Software, note VISUALSVN Server 2.7.11 later version will not support Windows 2003.

VISUALSVN server is free, and VISUALSVN is chargeable.

VISUALSVN is the client of SVN. Visual Studio comes with this client, but it's not free. If Visual Studio can use ANKHSVN (VS2008 plug-in) instead of VISUALSVN. NetBeans also comes with the SVN client.

After installation, the VISUALSVN Server service is added and if you want to uninstall VISUALSVN server, you need to do the following:
(1) Start-"Run, enter services.msc in the input box line OK
(2) Enter the service Manager to stop the VISUALSVN Server service, or in the middle of the uninstallation will say that the process is still running cannot uninstall

2, the installation will ask you to use what port, Visual SVN Server is to use the built-in Apache servers to provide services, actually here is the configuration of Apache port, configure a non-conflicting port can be, the general default can be.

3. Need to configure users after installation

4, then the configuration code warehouse, generally a team to configure a code warehouse is enough, a code warehouse can have multiple projects, of course, each project to build a code warehouse is also possible. After the code warehouse is configured, the file directory for that project appears at the same time as the disk directory of the code warehouse that is configured at installation time. For example, create a myproject warehouse:

Single-project Repository Before the tick indicates that the required directory structure is automatically created, you can see the newly created warehouse has three folders, generally only use trunk, the other two generally do not use (the details can be self-Baidu). The trunk is the directory where our code is saved.

Of course, the general project is not easy to create an empty warehouse directly, so it is more convenient.

5, the warehouse set up the project folder, used to store items, you can view the project address, this address is used to connect to the client

6, after the project folder is established, you can use SVN import to import the code into the project folder, of course, you can also use the client import.

7, VISUALSVN server is just a code management tool, the code on the disk is the VISUALSVN server database files, and can not be directly viewed, not to run directly and configured as a web directory.

If you need to copy the files inside the Web directory, you need to use SVN checkout to check out a copy to the Web directory, and then configure the Automatic Update script (using SVN update) to update in real time,

This uses SVN checkout instead of SVN export, because checkout is a version output that saves SVN's version information in the Web directory (you can view the Web directory with the SVN hidden folder) so that update updates only the modified files at a time.

Example: SVN checkout Http://svn.lnwsh.cn:8080/svn/projects/ewin E:\ewin--force, with force is a forced check-out, which avoids file conflicts resulting in a check-out failure

Then we configure the Automatic update script

@echo OffSET repos=%1set rev=%2set svn= "C:/Program files/visualsvn server/bin/svn.exe" SET dir= "D:/ewintravle" (call% svn% update%dir%--username user name--password user password--non-interactive--force)

Then in the code base of the Hooks folder will appear post-commit.bat This script file, you can also directly modify the file. The script is best to add the--force parameter, because this is the user doing the synchronization, and there is no need to worry about code conflicts. Destination directory at the end of the slash, to not error can not find the directory.

If the post-commit.bat of the hook is not executed when the client submits to VISUALSVN server, the file cannot be synchronized, first you can attempt to restart the service of VISUALSVN server. Then check the service run permissions:
Post-commit.bat file execution requires permissions, and VISUALSVN Server defaults to the NETWORK user group, which does not have bat permissions, causing the Post-commit.bat file to be unable to execute, the workaround is as follows:
My Computer-management-services:

If you still can't sync, you can run that batch file manually, see what the error message is, and then do the appropriate processing.

You can also change the sync command to

(Call%svn% update%dir%--username user name--password user password--non-interactive >>post-commit.log)

Then look at the Post-commit.log file to see the error message.

Using SVN in NetBeans

1. Use NetBeans's SVN client to import the initial code into the VISUALSVN server's code warehouse

2, other people can use the export function to export the project

3, NetBeans in the use of SVN online tutorial a lot, here is not detailed said.

VISUALSVN Server configuration and use with NetBeans

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.