Subversion Working Copy Downgrade

If you jump from one…

Login

Blog History

If you jump from one distribution to another and then back to an older version one of the gotcha's can be that later versions on newer distro's can change your Subversion Working Copy repository data so it's unaccessible from the older distro.

Case in point: On Ubuntu 8.0.4 svn is at 1.4.6 but on Ubuntu 8.10 / Fedora 10 it's in the 1.5.x series.

Problem:

svn commit -m "change printer list"
svn: This client is too old to work with \
working copy '/home/rupert/Docs/svn/work/kfc/doco/printers'; \
please get a newer Subversion client

# above lines ending in \ are wrapped for readability.

Cause:
Running a later version subversion on your local working copy automatically upgrades it.

So what to do?
The subversion website has the answer see the title Working Copy Upgrades for the detail.

In short download and run a python script to set the working copy back to the correct series version:

cd $YOUR_WORKING_COPY
chmod +x change-svn-wc-format.py
./change-svn-wc-format.py . 1.4
Converted WC at '.' into format 8 for Subversion 1.4

And Bobs your Uncle, you are done. The advantage of converting back to an older format is you don't have to upgrade your subversion client until your distribution does the hard bit of putting it into a package.

13 Comments

  1. Mike

    Exactly what I was looking for. I accidentally upgraded one of my clients that caused the working copy to get upgraded and then Intellij IDEA wouldn't recognize the new format so I lost all of the IDE features including the on the fly diff of files. Thanks!

    Mike

    Reply
  2. Judd

    Awesome, this did the trick. Much easier than trying to shoehorn a newer subversion package into CentOS. Thanks!

    Reply
    • james

      It always suprises which blog posts get people out of trouble. I'm glad it helped.

      Reply
  3. Kurt

    Oh yes, this was extremely helpful. I had upgraded my Subversion client from 1.5.9 to 1.6.2, but the internal version in Netbeans IDE is still on the 1.5 series. This caused all my changed files to look "unversioned" to Netbeans, wreaking havoc on my ability to tell what the heck had changed without diff-ing the bejeebers out of my file structure. This little script fixed all that.

    What you included that most others didn't (including the Subversion FAQ) was an actual command-line example (as opposed to describing how the command line should be without actually saying what the parameters should look like). This is a great help to those of us who are newbies at Python and/or lazy nitwits (I hope to fall in the former more than the latter).

    Reply
    • james

      Thanks Jason. Updated.

      Reply
  4. Phil

    I have an SVN server 1.4.6 on Fedora 10, and svn client 1.4.6 on Ubuntu 8.0.4. I STILL get this error, even though I checked in my project only a few days ago. I verified versions on both systems.

    Reply
  5. Rasika

    Thumbs Up..!!! It works for me perfectly and great work dude.

    Reply
  6. Brandon Smith

    I'm on Mac OSX, and I suddenly started getting this error with my svnx (I didn't upgrade my svn client, this just came up one day and now I can't get rid of it). When I try to run that python script, it says "Syntax Error: Expected end of line, etc. but found identifier." Could you explain how to run this?

    Reply
  7. Brandon Smith

    never mind - it turns out that my issue was because I was trying to add folders with content in them to the svn. I get that error message, but I find I don't get an error if I add and commit an empty folder, then add and commit the content.

    Reply
  8. Peanut

    Thanks for this post! It really helped me out. For some reason the "change working copy format" option in IntelliJ didn't fix the problem, but this python script did the trick.

    Reply
  9. Nath

    Thanks.. it worked great. Initially i faced some issue with running the python script using the python.exe from Cygwin distribution.. but after installing Python on my windows and adding it to PATH, im able to run and downgrade the working copy from 1.6 to 1.5 and there by resolving the IntelliJ Idea unversioned files automatically...

    Thanks

    Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.