tags:

views:

1316

answers:

2

I have an svn client installed on Mac OS X. I'm not sure if it came with Mac OS X or when I downloaded Xcode which contains Apple's Developer Tools. I can run "svn" off the command line but I'm not sure where the file/app is located.

When I run "svn --version" it says I have version 1.4 installed.

I notice that when I try to use SVN inside Xcode, it doesn't allow me to run commands to a server running 1.6. Presumably because my client is 1.4 and it's trying to connect to 1.6.

The error message I get whenever I choose SCM > Commit Entire Project is:

Error: 155021 (Unsupported working copy format) Description: This client is too old to work with working copy '...'; please get a newer Subversion client

My question is how do I update this svn client to 1.6 so that Xcode can still use it and hopefully without the need for 3rd party software.

I tried using the method described in Xcode and updated SVN, however it didn't work, I still get the same error message when trying to update/commit. Note: When trying to use this method, I noticed that they have a root /usr/lib/ folder but I used the ln command with the /Developer/SDKs/MacOSX10.5.sdk/usr/lib/ folder, since that is where all my files of similar names are located. So, for example, instead of the line:

ln -s -f /opt/subversion/lib/libapr-1.dylib /usr/lib/libapr-1.dylib

I replaced each line to look like this:

ln -s -f /opt/subversion/lib/libapr-1.dylib /Developer/SDKs/MacOSX10.5.sdk/usr/lib/libapr-1.dylib

and then I ran the file. Was this the right thing to do?

When I go to SCM > Repositories, it does show me my repository (I guess that means that it can successful use the svn list command, cause that's what it shows on the bottom).


Any other ideas?

Some stuff I thought could help is if there's a way to find out where the file svn is on the command line. Is there any way to find out where it is located?

I'm using Xcode version 3.1.3.

Thanks for the help.


Update: After reading some answers, I understand it better. So now I also have SCPlugin installed which contains an SVN 1.6 client. I want both Xcode and SCPlugin to work side by side, thus I would need to update the client Xcode is using to 1.6.

I used the 'which svn' command as recommended and it showed that svn is located in the /usr/bin/ folder. I didn't realize I had the /usr/ folder (Mac OS X newbie... didn't see it in finder so I thought it doesn't exist). I navigated to the /usr/ folder and found all the libsvn_* files, meaning I didn't need to modify the script to use the /Developer/SDKs/MacOSX10.5.sdk/usr/lib/ so I used a slightly tweaked .sh file from what they recommend here.

The first change is to get rid of the first occurrence of Delta replacing Diff. This is because the last two lines will already use Diff to replace Diff, so it is redundant and causes a message to appear when you sudo sh the file. The other thing I changed is adding 'cp' lines that copies all the original shortcuts to a root /backup/ folder, which you should create manually. This saved me the first time I accidentally ran it and replaced files in /Developer/SDKs/MacOSX10.5.sdk/usr/lib/ ... I just copied all the files over by using the mv command and everything was restored to how it originally was.

In case someone wants to run it, here's the version I ran:

cp -R /usr/lib/libapr-1.dylib /backup/libapr-1.dylib
ln -s -f /opt/subversion/lib/libapr-1.dylib /usr/lib/libapr-1.dylib
cp -R /usr/lib/libapr-1.0.dylib /backup/libapr-1.0.dylib
ln -s -f /opt/subversion/lib/libapr-1.dylib /usr/lib/libapr-1.0.dylib
cp -R /usr/lib/libaprutil-1.dylib /backup/libaprutil-1.dylib
ln -s -f /opt/subversion/lib/libaprutil-1.dylib /usr/lib/libaprutil-1.dylib
cp -R /usr/lib/libaprutil-1.0.dylib /backup/libaprutil-1.0.dylib
ln -s -f /opt/subversion/lib/libaprutil-1.dylib /usr/lib/libaprutil-1.0.dylib
cp -R /usr/lib/libsvn_client-1.dylib /backup/libsvn_client-1.dylib
ln -s -f /opt/subversion/lib/libsvn_client-1.dylib /usr/lib/libsvn_client-1.dylib
cp -R /usr/lib/libsvn_client-1.0.dylib /backup/libsvn_client-1.0.dylib
ln -s -f /opt/subversion/lib/libsvn_client-1.dylib /usr/lib/libsvn_client-1.0.dylib
cp -R /usr/lib/libsvn_fs_fs-1.dylib /backup/libsvn_fs_fs-1.dylib
ln -s -f /opt/subversion/lib/libsvn_fs_fs-1.dylib /usr/lib/libsvn_fs_fs-1.dylib
cp -R /usr/lib/libsvn_fs_fs-1.0.dylib /backup/libsvn_fs_fs-1.0.dylib
ln -s -f /opt/subversion/lib/libsvn_fs_fs-1.dylib /usr/lib/libsvn_fs_fs-1.0.dylib
cp -R /usr/lib/libsvn_fs-1.dylib /backup/libsvn_fs-1.dylib
ln -s -f /opt/subversion/lib/libsvn_fs-1.dylib /usr/lib/libsvn_fs-1.dylib
cp -R /usr/lib/libsvn_fs-1.0.dylib /backup/libsvn_fs-1.0.dylib
ln -s -f /opt/subversion/lib/libsvn_fs-1.dylib /usr/lib/libsvn_fs-1.0.dylib
cp -R /usr/lib/libsvn_ra_local-1.dylib /backup/libsvn_ra_local-1.dylib
ln -s -f /opt/subversion/lib/libsvn_ra_local-1.dylib /usr/lib/libsvn_ra_local-1.dylib
cp -R /usr/lib/libsvn_ra_local-1.0.dylib /backup/libsvn_ra_local-1.0.dylib
ln -s -f /opt/subversion/lib/libsvn_ra_local-1.dylib /usr/lib/libsvn_ra_local-1.0.dylib
cp -R /usr/lib/libsvn_ra_svn-1.dylib /backup/libsvn_ra_svn-1.dylib
ln -s -f /opt/subversion/lib/libsvn_ra_svn-1.dylib /usr/lib/libsvn_ra_svn-1.dylib
cp -R /usr/lib/libsvn_ra_svn-1.0.dylib /backup/libsvn_ra_svn-1.0.dylib
ln -s -f /opt/subversion/lib/libsvn_ra_svn-1.dylib /usr/lib/libsvn_ra_svn-1.0.dylib
cp -R /usr/lib/libsvn_ra-1.dylib /backup/libsvn_ra-1.dylib
ln -s -f /opt/subversion/lib/libsvn_ra-1.dylib /usr/lib/libsvn_ra-1.dylib
cp -R /usr/lib/libsvn_ra-1.0.dylib /backup/libsvn_ra-1.0.dylib
ln -s -f /opt/subversion/lib/libsvn_ra-1.dylib /usr/lib/libsvn_ra-1.0.dylib
cp -R /usr/lib/libsvn_wc-1.dylib /backup/libsvn_wc-1.dylib
ln -s -f /opt/subversion/lib/libsvn_wc-1.dylib /usr/lib/libsvn_wc-1.dylib
cp -R /usr/lib/libsvn_wc-1.0.dylib /backup/libsvn_wc-1.0.dylib
ln -s -f /opt/subversion/lib/libsvn_wc-1.dylib /usr/lib/libsvn_wc-1.0.dylib
cp -R /usr/lib/libsvn_repos-1.dylib /backup/libsvn_repos-1.dylib
ln -s -f /opt/subversion/lib/libsvn_repos-1.dylib /usr/lib/libsvn_repos-1.dylib
cp -R /usr/lib/libsvn_repos-1.0.dylib /backup/libsvn_repos-1.0.dylib
ln -s -f /opt/subversion/lib/libsvn_repos-1.dylib /usr/lib/libsvn_repos-1.0.dylib
cp -R /usr/lib/libsvn_subr-1.dylib /backup/libsvn_subr-1.dylib
ln -s -f /opt/subversion/lib/libsvn_subr-1.dylib /usr/lib/libsvn_subr-1.dylib
cp -R /usr/lib/libsvn_subr-1.0.dylib /backup/libsvn_subr-1.0.dylib
ln -s -f /opt/subversion/lib/libsvn_subr-1.dylib /usr/lib/libsvn_subr-1.0.dylib
cp -R /usr/lib/libsvn_delta-1.dylib /backup/libsvn_delta-1.dylib
ln -s -f /opt/subversion/lib/libsvn_delta-1.dylib /usr/lib/libsvn_delta-1.dylib
cp -R /usr/lib/libsvn_delta-1.0.dylib /backup/libsvn_delta-1.0.dylib
ln -s -f /opt/subversion/lib/libsvn_delta-1.dylib /usr/lib/libsvn_delta-1.0.dylib
cp -R /usr/lib/libsvn_diff-1.dylib /backup/libsvn_diff-1.dylib
ln -s -f /opt/subversion/lib/libsvn_diff-1.dylib /usr/lib/libsvn_diff-1.dylib
cp -R /usr/lib/libsvn_diff-1.0.dylib /backup/libsvn_diff-1.0.dylib
ln -s -f /opt/subversion/lib/libsvn_diff-1.dylib /usr/lib/libsvn_diff-1.0.dylib

Now if I run 'svn --version', it shows up as client 1.6.3 which is perfect. Xcode works flawlessly as well too. Thanks for the answers that helped me understand what's going on better.

+1  A: 

The error you're getting is because at some point you've managed to get a version 1.6 client running on your machine. I assume this happened at when you were trying to upgrade.

This happened because as soon as a client sees a working copy, it upgrades it to its current version. So you ran with a 1.6 client, it upgraded the working copy, and now you're using the 1.4 client again, so you get the error you see.

It's nothing to do with the server per-se - if you commit the current working copy using a new client, then delete the working copy and get a fresh checkout with xcode, you'll be up and working again no problem (with the old clients still).

1.4 clients can talk to 1.6 servers quite happily, you just don't get all the 1.6 features, like merge tracking and improved tree conflicts.

As for finding out where the svn client is, does the command:

which svn

work on a osx system?

Jim T
Thanks for helping, the 'which svn' command does work on OS X and it shows that it's in /usr/bin/svn. This led me to find the solution I was looking for.
Senseful
+1  A: 

Presumably because my client is 1.4 and it's trying to connect to 1.6.

No. The problem is the format of the local working copy which you checked out. The meta-data in the .svn folders is automatically upgraded to a new format when you touch it with a newer svn client, e.g. checked out with svn 1.4.x and used with svn 1.5.y. Once this upgrade happened, the older client can no longer use the working copy.

The solution is to either

  1. upgrade one of your svn clients so that they are at the same version (preferable)
  2. or check out a fresh working copy
  3. or use the downgrade script as explained here

Options (2) and (3) require that you don't accidentally touch the working copy with the newer svn client again, so (1) really is preferable.

Wim Coenen