no

Introduction to Eclipse, Subclipse, and Visual Svn Server

If you are tired of the usual copy all, zip backup your application files then I suggest you try using SVN. But let me clarrify, SVN is not...

If you are tired of the usual copy all, zip backup your application files then I suggest you try using SVN. But let me clarrify, SVN is
not a backup management tool. Instead it's a way of properly tagging each file, fix/update wherein you can put comment in each change.
This will help us track our changes and reverse to a stable code when our code failed. (There are many articles about SVN just try googling it).

This tutorial assumes that an eclipse IDE (regardless which: java, php, etc) is already installed in your computer (windows OS).
In case not you can try downloading eclipse-java here: http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/galileo/SR1/eclipse-java-galileo-SR1-win32.zip. It's a zip file and can be extracted in your root drive like c:.

After download update your eclipse installation by clickng Help->Install New Software->Add and in Location type: http://subclipse.tigris.org/update_1.6.x. Restart your eclipse.

You may ask why use svn when eclipse already have a built in cvs, well personally I find svn more user friendly.

Now that our client is setup we need an SVN Server that can be deployed on a windows environment. I found Visual SVN which you can download here: http://www.visualsvn.com/files/VisualSVN-Server-2.0.7.msi. Install and add user.

How to add user to Visual SVN:
1.) Run Visual SVN
2.) Right click users->Create user
3.) Enter a name and password and click ok

How to create a repository
1.) Run Visual SVN
2.) Right click Repositories->Create repository
3.) For this tutorial enter "test" in the Repository Name
4.) Check "Create default structure...". This will initialize to have branches, trunk and tags in the root directory.



Now that we have a test repository, let's try creating a project using eclipse:
1.) Open up the eclipse IDE
2.) Select File->New->Other, then select SVN->Checkout Projects from SVN

3.) In the "Checkout from SVN" window select "Create a new repository location" click next
4.) In the Url field enter the location of our newly created "test" repository,
in case you forgot - in the Visual SVN window under Repositories, right click "test" and select "Copy URL to Clipboard"
5.) Then in the select folder, usually we are developing in the trunk folder so select it


6.) In the "Checkout from SVN", select "Check out as project configured using the New Project Wizard"
7.) Select "Java Project" and enter a name
8.) The SVN based project created should now appear in the eclipse ide




Now our SVN client and server are setup.
How to add a file and commit:
1.) Under src directory create a new class, named Test.java
2.) Right click Test.java, then select Team->Add to Version Control
3.) Finally to commit select the file or you can select the whole project->Team->Commit


That's it :-D.

Related

java-eclipse 7174851870015921625

Post a Comment Default Comments

12 comments

Karthik Kottapalli said...

thank you so much!!!!!

it helped me a lot!!!

Anonymous said...

Excellent information. Works great!

Thanks

Anil Philip said...

Trying to install subclipse, I get this error: "Cannot connect to keystore.
This trust engine is read only."
(Windows 7, Eclipse 3.5.2, Subclipse 1.6.X, Java 1.6.21)

Santacrab said...

How to connect from a remote comuter using a dydns address?

Unknown said...

Thankx for the help.... So now i am able to commit everything to the repository. But to access back the lastest code.....

Thanks Himadri

Praveen said...

It was very helpful. thanks a lot. Also please include the procedure for retrieving the most recent copy from the svn.

Deepa said...

Excellent info...thanks a lot.

tong123123 said...

But if I already have a project in eclipse, I want placed it in visualSVN Server and using subclipse, how to do it?

Anonymous said...

Thanks, very helpful!

Kalidas said...

helped a lot but I am working on SVN server 2.5.6 and Eclipse Juno, so I assumed some steps.

Sunil said...

Thanks a lot!!!
Local SVN server :D saved me!

Unknown said...

Hello,
I have tried as instructed, but when I click on check out from svn and provide the URL, it's throwing an error saying Folder '' doesnot exist remotely. Please help
Thank you in advance

item