CodeIgniter Forums
Subversion on OS X, concurrent use of 1.4 and 1.5? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Subversion on OS X, concurrent use of 1.4 and 1.5? (/showthread.php?tid=16642)

Pages: 1 2


Subversion on OS X, concurrent use of 1.4 and 1.5? - El Forum - 03-12-2009

[eluser]Manu Chao[/eluser]
Short question: any point in keeping the 1.4.x of the Subversion CLIENT around?

Long question:
On Mac OS X 10.5, Subversion 1.4.4 comes pre-installed in /usr/bin. I've now installed Subversion 1.5.5 from Martin Ott's site, which places the binaries in /usr/local/bin. Even though /usr/local/bin is part of the path ('export PATH=/usr/local/bin:$PATH' in ~/.profile), /usr/bin seems to take precedence and 'svn --version' reports 1.4.4 and only '/usr/local/bin/svn --version' reports 1.5.5.

I mainly interact with Subversion via Versions.app, only for merging do I need to drop back to the command line. Some of my repositories are on 1.4.x and some on 1.5.x. My tendency would be to drop 1.4 ( or at least put it somewhere out of sight) since I can interact with 1.4 repositories using the 1.5 Subversion client. Versions anyway can connect to both, probably using its 1.5 client for both. Only if I needed to create a local 1.4 repository, would I need the Subversion 1.4 on my computer (is this right?).

Can I somehow make /usr/local/bin/svn the default over /usr/bin/svn when typing 'svn'? Or is this only possible via aliases for all svn commands (incl. svnadmin etc.)? Or could I just swap the location of all the svn binaries between /usr/bin and /usr/local/bin? Is there anything else I should move?

Thanks a lot in advance.


Subversion on OS X, concurrent use of 1.4 and 1.5? - El Forum - 03-12-2009

[eluser]pistolPete[/eluser]
Quote:Versions anyway can connect to both, probably using its 1.5 client for both.
This depends on the preferences. The standard setting is "1.4.6 (most compatible".

Quote:Can I somehow make /usr/local/bin/svn the default over /usr/bin/svn when typing ‘svn’?
You can change this using an alias:

Code:
alias svn=/usr/local/bin/svn

Prefixing $PATH with /usr/local/bin worked for me as well.


Subversion on OS X, concurrent use of 1.4 and 1.5? - El Forum - 03-12-2009

[eluser]Matthieu Fauveau[/eluser]
One thing to note is that on some webserver distribution package (like Ubuntu for instance) svn is not always available in the latest version (if you don't want to compile). It could be problematic when deploying the app via svn on the production server.

This is why I stick to 1.4, it ensures that I can deploy safely on the production server. But I'm relatively new to svn. Never did branches or merging yet. I'm still not sure how to do it right for a web app. Any clues ?

Regards,
Matt.


Subversion on OS X, concurrent use of 1.4 and 1.5? - El Forum - 03-12-2009

[eluser]Manu Chao[/eluser]
Your are naturally correct about the settings in the preferences of Versions, I forgot about that.
But could you please spell out for me how exactly that path and/or alias stuff should look like? As I said, I have svn 1.4.4 installed in /usr/bin. You report that 'setting the path' worked for you, but do you also still have svn 1.4.4 in /usr/bin?
Currently my home directory has one .bash_aliases file containing one line:
alias svn=/usr/local/bin/svn
and one .profile file containing three lines:
PATH=/usr/local/bin:$PATH
export PS1="\[\033]0;\u@\h:\w\007\]\u@\h:\W\\$ "
export PATH=/usr/local/bin:$PATH
(the second line adds the full path to the prompt, something Leopard 'broke').
Typing 'svn --version' still shows 1.4.4. What am I doing wrong here?
Thanks.


Subversion on OS X, concurrent use of 1.4 and 1.5? - El Forum - 03-12-2009

[eluser]pistolPete[/eluser]
Put this into .profile:
Code:
alias svn=/usr/local/bin/svn

Works for me Smile


Subversion on OS X, concurrent use of 1.4 and 1.5? - El Forum - 03-12-2009

[eluser]Manu Chao[/eluser]
[quote author="pistolPete" date="1236905899"]Put this into .profile:
Code:
alias svn=/usr/local/bin/svn

Works for me Smile[/quote]
Tried that in .profile as well.
svn --version still reads 1.4.4
Does /usr/bin/svn --version read 1.4.4 for you?


Subversion on OS X, concurrent use of 1.4 and 1.5? - El Forum - 03-12-2009

[eluser]pistolPete[/eluser]
Quote:Does /usr/bin/svn—version read 1.4.4 for you?

Yes, it is.

Quote:$ svn --version
svn, version 1.4.4 (r25188)

$ which svn
/usr/bin/svn

Try a temporary alias:

Quote:$ alias svn=/usr/local/bin/svn
$ svn --version
svn, version 1.5.5 (r34862)



Subversion on OS X, concurrent use of 1.4 and 1.5? - El Forum - 03-12-2009

[eluser]Manu Chao[/eluser]
Temporary alias works. Now the question, why does it not read my .profile file?


Subversion on OS X, concurrent use of 1.4 and 1.5? - El Forum - 03-12-2009

[eluser]pistolPete[/eluser]
Try removing all of the bash config files (.profile, .bashrc, etc.), but make a backup first.
Then see if it's working if you put the alias into .profile.


Subversion on OS X, concurrent use of 1.4 and 1.5? - El Forum - 03-12-2009

[eluser]Manu Chao[/eluser]
Yes, it works. Thanks a lot.
I have:
.bash_profile
.bashrc
.bashrc.save
.bashrc.txt
.bashrc_history
.profile
All have some 'export' entries in them. I guess some house-cleaning would be on order. My system dates back to 10.0.4, OS upgrades and migration assistant ensured a rich history of configuration files :Smile.
Anything in there I really need, on top of the one .profile file?