About how to use subversion in eclipse

Source: Internet
Author: User
Tags svn client tortoisesvn
Keywords: Tutorial on using Subversion with Eclipse
tool:
svn-1.3.2-setup.exe …………………………………… SVN server
TortoiseSVN-1.3.5.6804-svn-1.3.2.msi ……………… SVN client
LanguagePack-1.3.5.6804-win32-zh_CN.exe ………… Chinese Language Pack
Subclipse ……………………………………………… Eclipse Plugin
Steps for usage:
 
Step 1: Establish a recommended virtual directory structure: For example: I created a directory like this: D: \ temp \ New \, and, in this directory, created three folders with the names: trunk, branches, tags . Then copy the items we want to control to the trunk. (Save in trunk)
Step 2: Create a Subversion repository: For example: I created a folder named SVN on drive D, right-clicked, and selected TortoiseSVN-> create restore here, then click OK
Note:
The use of Subversion is mainly to create a server-side repository, where the key files are in the conf folder
authz, svnserve.conf, passwd three files
Authz is used to deploy access permissions, the passwd file stores visitor passwords, and svnserve.conf belongs to the basic configuration file, which is used to configure access to other files.
Step 3: Modify the configuration file, in the authz in the conf folder in the Subversion repository:

[groups]
harry_and_sally = harry,sally
 
# [/foo/bar]
harry = rw
* =
 
[/]
@harry_and_sally = rw
* = r
In passwd, modify it as follows:
[users]
harry = harry
sally = sally
In svnserve.conf, modify:
[general]
anon-access = none
auth-access = write
password-db = passwd
authz-db = authz
Step 4: Start the server: In the command line, enter: svnserve -d -r to create a Subversion repository.
My path is D: \ SVN
Step 5: Import the data: Import the contents of the virtual directory just created into the Subversion repository.
It should be right-click in the New folder and select check out, as shown in the figure:
Tutorial on using Subversion in Eclipse (Figure 1)
This will create these contents in the Subversion repository. We can right-click on the SVN folder, select TortoiseSVN-> Repo-brower and you will see the content shown in the figure:
Tutorial on using Subversion under Eclipse (Figure 2)
click to view bigger image

(Note that the versions of the files in the beginning are all 1. I'm taking screenshots after operating it, sorry.)
Step 5: Install the Subclipse plug-in in Eclipse. After installation, select Windows-> Show View-> others in Eclipse and the following figure will appear:
For a tutorial on using Subversion in Eclipse (Figure 3), select the SVN repository, then right-click on the console, select New-> Database Location, and it will appear:
Tutorial on using Subversion under Eclipse (Figure 4)
After clicking Finish, you will see a picture on the console: About using Subversion tutorial in Eclipse (Figure 5) About using Subversion tutorial in Eclipse (Figure 6)



After clicking Finish, you will see a picture on the console: About using Subversion tutorial in Eclipse (Figure 5) About using Subversion tutorial in Eclipse (Figure 6)
click to view bigger image

<iframe name="google_ads_frame" marginwidth="0" marginheight="0" src="http://pagead2.googlesyndication.com/pagead/ads?client=ca-pub-1572879403720716&amp;amp;dt=1184652062593&amp;amp;hl=zh-CN&amp;amp;lmt=1180249587&amp;amp;alternate_ad_url=http%3A%2F%2Fwww.pcdog.com%2F0000js%2Fgoogle336.htm&amp;amp;format=336x280_as&amp;amp;output=html&amp;amp;correlator=1184652062515&amp;amp;channel=6686853775&amp;amp;url=http%3A%2F%2Fwww.pcdog.com%2Fedu%2Fjava%2F2007%2F02%2Fd181876_2.html&amp;amp;color_bg=FFFFFF&amp;amp;color_text=000000&amp;amp;color_link=0000ff&amp;amp;color_url=008000&amp;amp;color_border=FFFFFF&amp;amp;ad_type=text_image&amp;amp;ref=http%3A%2F%2Fwww.pcdog.com%2Fedu%2Fjava%2F2007%2F02%2Fd181876.html&amp;amp;cc=24&amp;amp;flash=9&amp;amp;u_h=1024&amp;amp;u_w=1280&amp;amp;u_ah=964&amp;amp;u_aw=1280&amp;amp;u_cd=32&amp;amp;u_tz=480&amp;amp;u_his=2&amp;amp;u_java=true" frameborder="0" width="336" scrolling="no" height="280" allowtransparency="allowtransparency"></iframe>

Step 6: Select truck, right-click and select to take out: as shown in the figure:
Tutorial on using Subversion under Eclipse (Figure 7)
Add a working copy in Eclipse after selecting Finish
as the picture shows:
Tutorial on using Subversion under Eclipse (Figure 8)
click to view bigger image
At this time, it is equivalent to setting up a client in a certain location on the disk. By default, it is in a certain folder in the Eclipse workspace.
Step 7: Establish branches and tags: Click on the items that need branches and tags; select Team-> Branch / Tags, as shown in the figure:
Tutorial on using Subversion in Eclipse (Figure 9)
After clicking OK, it will appear in the console: Copy-rHEADsvn: // localhost / trunk / News svn: //localhost/branches/branches_4.1
Indicates that this branch has been established, same as above, creating a copy of the tag
Tutorial on using Subversion in Eclipse (Figure 10)
Will appear in the console: copy -rHEAD svn: // localhost / trunk / News svn: //localhost/tags/tags_4.1
Step 8: Establish a switch, the effect is that the operation of this branch will not affect the program in tunck
 Select the folder you just created, right-click and select Team-> Switch as shown in the figure:
 A tutorial on using Subversion in Eclipse (Figure 11)
click to view bigger image

 After clicking OK, it will be displayed on the console: switch svn: // localhost / trunk / News E: / javaStady / trunk / News -rHEAD
Step 9: Merge operation. You can synchronize some files, and integrate the changes of the new version into the trunk. On the console, we can see: merge -rHEAD: HEAD svn: // localhost / branches /branches_4.1 E: / javaStady / trunk / News
     Merge complete.
merge -rHEAD: HEAD svn: //localhost/branches/branches_4.1 E: / javaStady / trunk / News
Merge complete.
 
Finally we look at the changes in TortoiseSVN-> Repo-brower:
A tutorial on using Subversion under Eclipse (Figure 12)
click to view bigger image
  Merge actually compares the differences between the two versions before and after, and then applies these differences to an operation on the working copy. According to the sequence of the source and destination version numbers, different effects such as "merge" and "undo" appear, and then pass Commit to save these effects to the server.

Related Article

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.