Error -> Build failed -> Please upgrade your Subversion client to use this working copy

13,401

Solution 1

Xcode doesn't yet support SVN 1.7. Only 1.6 is supported. In order to fix your problem, you'll need to switch to using an SVN 1.6 compatible working copy.

Since SVN 1.7 client is unable to work with 1.6 working copies at all, you'll need to remove SVN 1.7.x from your client and revert to 1.6. (Or perhaps just adjust your PATH so the SVN 1.6 tools are first.) Once 1.6 is back, delete or move aside your existing working copy and check out a fresh copy with SVN 1.6. Now Xcode should be able to work with your working copy.

Note that you can freely use SVN 1.6 client with an SVN 1.7 server. Some of the newer features won't be available, but it will work. There's no need to downgrade the server or your server-side repositories.

Keep an eye on the Xcode release notes in updates as I'm sure Apple will note when Xcode is capable of using SVN 1.7. When a 1.7 compatible release of Xcode becomes available, it should then be safe to upgrade your client to 1.7 and migrate your working copy again.

Solution 2

There is a post that appears to imply that you can fool XCode into using svn 1.7 client by changing your PATH and setting up a couple of soft links in strategic places. Unfortunately, the post is in Chinese. Fortunately, Google translate and the presence of UNIX commands make it possible to decrypt what the post is saying. I will try it in the next few days, and update the answer if anything useful comes out of this exercise.

EDIT: I tried the steps from the post, and it worked. Here is what I did:

  • Downloaded and installed svn client 1.7.2 into /opt/subversion
  • Added /opt/subversion/bin to my PATH in .bash_profile
  • Created a backup directory /Developer/usr/bin/orig.svn
  • Moved /Developer/usr/bin/svn* to /Developer/usr/bin/orig.svn
  • Ran ln -s /opt/subversion/bin/svn* /Developer/usr/bin/

After that I re-started XCode, went to Organizer, and was able to attach a working copy of a checkout created with svn 1.7.2 client. Organizer showed a green dot next to the repository, displayed a list of revisions, etc., so at this point I believe that the trick has worked.

Share:
13,401
Tim
Author by

Tim

still learning :-)

Updated on June 20, 2022

Comments

  • Tim
    Tim almost 2 years

    I am using Xcode 4.2.1 and I have this problem running an existing application on the iOS simulator:

    svn: The path '.' appears to be part of a Subversion 1.7 or greater
    working copy.  Please upgrade your Subversion client to use this
    working copy.
    /Users/me/Library/Developer/Xcode/DerivedData/myproject-dxfzldckuqdmlrghowwkdrbgoigy/Build    /Intermediates/myproject.build/Debug-iphonesimulator/MyProject.build/Script-9567AEA113C59633000AA291.sh: No Subversion revision found at /Users/me/Library/Developer/Xcode/DerivedData/myproject-dxfzldckuqdmlrghowwkdrbgoigy/Build/Intermediates/myproject.build/Debug-iphonesimulator/MyProject.build/Script-9567AEA113C59633000AA291.sh line 32.
    Building revision 
    Command /bin/sh failed with exit code 1
    

    I have a Subversion server 1.7.1 installed and also on the client side I upgraded to 1.7.1. I did a svn upgrade and then I get this error in Xcode.

    If I repeat the svn upgrade on the terminal I get the message Can't upgrade '...' as it is not a pre-1.7 working copy directory.

    So what is wrong? How an I solve the problem?

  • ThomasW
    ThomasW about 12 years
    This is good if you're a single developer, but probably not as good if you're working on a team. Also, you'll need to set up additional links if you're using the other svn tools like svnversion.
  • Sergey Kalinichenko
    Sergey Kalinichenko about 12 years
    @ThomasW I think the steps are easy to follow and automate through a script, so this should work for a small team as well. Setting additional links is not necessary, because you can continue using SVN client from the command line relying on the path settings; the links are there to trick Xcode into using a different version of the SVN client.
  • ThomasW
    ThomasW about 12 years
    you're right that it can be automated through a script, but you'll have to make sure that the script gets run every time you update Xcode. It can be a issue with other svn tools if those tools are called by scripts within an Xcode project. I suppose this becomes a non-issue if Apple ever updates the standard svn install, but they still haven't with Xcode 4.3.