How to upgrade SVN on a mac

Mac OS X 10.5 comes with an outdated svn version, I think it’s 1.4. For work, I need to update this to 1.6.

To check the current version, open the terminal and type:

svn -help

The version number is located on the first line.

To upgrade, download a binary package from: http://subversion.tigris.org/getting.html#osx

Then add this to .profile or .bash_profile:

vi ~/.profile

export PATH=/usr/local/bin:$PATH

Try to check for the version again. If it still uses the same version, try source command

source .profile

SVN Repository View in Eclipse

This is a way to browse SVN Repository in eclipse.

To open the SVN Repository View, go to Windows> Open Perspective > Others > SVN Repository Exploring

Subclipse 1.6 Update to HEAD VS Update to Version…

Today I updated my eclipse to use subclipse version 1.6. When I go to Team, there are 2 update functions: update to head and update to version.

According to a release note:

Update has been renamed to Update to HEAD

Update to version has been added

Source: http://subclipse.tigris.org/issues/show_bug.cgi?id=866

SVN Commit Failed

Today when I tried to commit from Terminal, I have got this message:

“svn: None of the environment variables SVN_EDITOR, VISUAL or EDITOR is set, and no ‘editor-cmd’ run-time configuration option was found”

But svn checkout, status and update are working. I did some research and found that I can get around this by using -m parameter

svn ci -m “message”

And again, it works.

Ecplise and SVN

Today I installed Eclipse [3.4] (http://www.eclipse.org/) on my Windows machine. The installtion is very straight forward. However, some extra works are required to get it to work with SVN.

Installing subclipse:

1. Go to Help > Software Updates

2. Go to Available Software tab

3. Add Site: http://subclipse.tigris.org/update_1.4.x

4. Expand subclipse tree.

5. Tick: Subclipse and JavaHL Adapter

6. Install

7. Restart eclipse

My frist attempt was to install without JavaHL Adapter. When I tried to checkout an SVN project, I have got this error “Unable to load default SVN client.” Thanks to Google (http://www.google.com) and this blog (http://www.coldfusionjedi.com/index.cfm/2008/9/5/Subclipse-and-Unable-to-load-default-SVN-client)

Note: Eclipse version in the image is 3.0 but I am using 3.4