Call macports svn, not pre-installed mac svn

I have a predefined macro 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 looks like this: export M2_HOME = / Users / teoh / work / maven export M2 = $ M2_HOME / bin export PATH = $ M2: $ PATH

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

how to set macport svn as svn default every time i use console in mac? What do I need to add to .bash_profile?

+4
source share
3 answers

The Macports installation installs links to / opt / local / bin and / opt / local / sbin by default.

So adding:

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

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

I would also add that it is not that MacPorts did not do this for you when you installed it. Check the line similar to the one above in your .bash_profile. If you have such a line, try moving it to a lower position in the file.

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

+9
source

In your .bash_profile file you can put:

 alias svn=/opt/local/var/macports/software/subversion/1.6.3_0/opt/local/bin/svn 
+1
source

you need to set macport svn location on the way to the predefined svn location.

+1
source

All Articles