tags:

views:

354

answers:

3

i have mac preinstalled svn at ->/usr/bin/svn

i have macport install svn at -->opt/local/var/macports/software/subversion/1.6.3_0/opt/local

my .bash_profile look like export M2_HOME=/Users/teoh/work/maven export M2=$M2_HOME/bin export PATH=$M2:$PATH

export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home export PATH=/Users/teoh/work/gwt-mac-1.5.3:$PATH

how to set macport svn as default svn each time i use the console in mac? what do i need to put in .bash_profile?

A: 

In your .bash_profile file you can put:

alias svn=/opt/local/var/macports/software/subversion/1.6.3_0/opt/local/bin/svn
alxp
This will break when subversion is updated.
Nerdling
A: 

you need to set the macport svn location on the path before the preinstalled svn location.

Aaron Saunders
+4  A: 

The default install of Macports install links into /opt/local/bin and /opt/local/sbin.

So adding:

export PATH=/opt/local/bin:/opt/local/sbin:$PATH

at the end of your .bash_profile should let you access MacPorts svn.

I would also like to add that it is odd that MacPorts didn't do this for you when you installed it. Check for the line similar to above in your .bash_profile. If you have a line like it then try moving it to a position lower in the file.

You can also use 'which svn' in bash to determine which copy of subversion you are using.

MitMaro