Step by step instructions
Subversion is our favorite version-control system, and we definitely recommend it above all others (including commercial products) in most scenarios. There may be certain areas where commercial systems excel, but for overall version control, it's tough to beat Subversion.
Here are my notes for installing Subversion, TortoiseSVN (a Subversion client which integrates with Windows Explorer), and Subclipse (the plugin for Eclipse integration) on Windows. This assumes you already have Eclipse installed. Also, these notes are geared towards version control for individual use as opposed to team use.
- Install Subversion and TortoiseSVN using SVN 1-Click Setup
- Go to http://svn1clicksetup.tigris.org/, click "Download the latest version", run the installer, and accept all the defaults.
- This is a Windows installer used "to simplify the process of setting up a Subversion repository on a Windows-based computer. Svn1ClickSetup takes a user through the steps necessary to install the Subversion command-line utilities and TortoiseSVN, as well as creating a repository and initial project." --from svn1clicksetup.tigris.org
- To check that something went right, go to Windows Explorer and right-click on a file. You should see the "TortoiseSVN" context menu item.
- Install the Subclipse plugin using the instructions at http://subclipse.tigris.org/install.html.
- Define the SVN Repository
- In Eclipse, from the "Window" menu, select "Open Perspective" > "Other...". Select "SVN Repository Exploring" and click "OK".
- Inside the "SVN Repository" window, right-click in the big empty space, and select "New" > "Repository Location...".
- In the "Url:" box, type "svn://localhost". Click "Finish". (Use this url to connect to the repository hosted on the SVN server on your local machine created using svn1clicksetup. I got this tip from http://james.cooley.ie/2006/12/01/version_control_with_eclipse_on_windows.html. If you want to use a repository on another server, then point to that location instead. "file://, http://, or https:// are the other protocols that can be used.)
- Add an Eclipse project to the repository
- In the "Navigator" window, right-click on a project and select "Team" > "Share Project...".
- Select "SVN" and click "Next"
- Your repository, "svn://localhost", (which you added in step 3) should show up here. Click "Next".
- Click "Next" again. Click "Finish". I got the following output in the "Console" window:
Filesystem has no item svn: URL 'svn://localhost/my_project' non-existent in that revision mkdir -m "Initial import." svn://localhost/my_project checkout -N -r HEAD svn://localhost/my_project Checked out revision 5.
- Select the files you want to add and click "OK". I got the following output in the "Console" window:
add -N C:\path\to\my_project\test.py A C:/path/to/my_project/test.py commit -m "Initial import." C:/path/to/my_project/test.py Adding path/to/my_project/test.py Transmitting file data ... Committed revision 6.
- See this article for more information: How to use Subversion with Eclipse
- Modify and commit a file
- Edit one of the newly added files and save it.
- In the "Navigator" window, right-click on the file, and select "Team" > "Commit...".
- Enter a comment and click "OK". I got the following output in the "Console" window:
commit -m "test" C:/path/to/my_project/test.py Sending path/to/my_project/test.py Transmitting file data ... Committed revision 7.
- Show the history for a file
- In the "Navigator" window, right-click on the file, and select "Team" > "Show History".
- The "History" window should open showing the revisions of your file. Double-click on a revision to open it or right-click for other options.
It work successfully on my local computer. If I were to access my SVN here from another computer connected in a LAN, how will I do it? Am I just going to type, http://ip_address/project_name ?
And can you also post how to create a subversion using Apache Server 2.2.x?
Thank you so much!
Marnel, I'm sorry I'm no longer using subversion or eclipse so I won't be able to answer your question. I hope you can find your answer elsewhere. Thanks for reading.
A tutorial about how to install SVN plugin in eclipse: Very easy.
works still on win7 64bit. had to get the 64bit of TortoiseSVN however. sweet. thanks.
Thanks a lot, it really helped a lot.... though i used a pre-existing repository at file:///... but still finally i get it the way i wanted....
Really appreciate your effort...
Awesome! Very clear instructions and easy to understand. I had never worked on Java before and hadn't even seen the Eclipse perspective,yet I was able to install and configure Subclipse in less than half an hour.
Thanks a lot man!
Hey, fantastic guide. I didn't follow it exactly but it was easy to pick out the bits that I needed. Nice work.
Thanks very well documented!
Good job!!! I did configuration quickly as well as i could understand easily. Thanks a lot Albert....