1

I'm unable to run svn commands in an existing repository.

Running svn status results in this :

gene@gene-ThinkPad-T60p:~/Dropbox/CDS$ svn status 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.

After some googling I thought that the right thing to do would be to run svn upgrade, (but this was a red herring, upgrade doesn't upgrade your installation of SVN, it upgrades the version implicit in the project). In any event, upgrade is not available in version 1.6

gene@gene-ThinkPad-T60p:~/Dropbox/CDS$ svn upgrade
Unknown command: 'upgrade'
Type 'svn help' for usage.

I tried to update of subversion (aka svn at the command lines) I tried sudo apt-get update then sudo apt-get upgrade, with no effect. I also tried sudo apt-get install subversion, with no effect.

I downloaded the source code and tried building subversion, but I got this error after running ./configure

...truncated...

/bin/grep -E checking whether ln -s works... yes checking for a
BSD-compatible install... /usr/bin/install -c configure: Apache
Portable Runtime (APR) library configuration checking for APR... no
configure: WARNING: APR not found The Apache Portable Runtime (APR)
library cannot be found. Please install APR on this system and
configure Subversion with the appropriate --with-apr option.

You probably need to do something similar with the Apache Portable
Runtime Utility (APRUTIL) library and then configure Subversion with
both the --with-apr and --with-apr-util options.

configure: error: no suitable APR found

I had already read a few pages about the APR utility in the readme for SVN, but it seemed very involved. Maybe APRUTIL is for installing the server version of SVN rather than the client?

This command sudo apt-get install libapache2-svn says that I'm already at the most current version.

(edit:) When I try sudo apt-get install subversion it says that I'm at the newest version

Reading package lists... Done
Building dependency tree
Reading state information... Done
subversion is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

But, my current version (based on svn --version) is svn, version 1.6.17 (r1128011) compiled Jun 26 2013, 20:44:02. This seems recent to me, but according to the website they're already on 1.8.

Thanks in advance for any help.

  • I figure you are confusing repository and working copy, since you use svn not svnadmin in that folder. So that folder in your Dropbox is a working copy right? I don't know how I feel about Dropbox below an SCM tool, but I hope you know what you're doing. ;) – Johannes Aug 28 '13 at 22:50
  • As the error says, there is no such command. Maybe you meant svn update. – psusi Aug 29 '13 at 2:15
  • I definitely meant upgrade: stackoverflow.com/questions/7992034/svn-upgrade-working-copy I'm on a different computer right now that has SVN 1.7, and upgrade does exist, but it's available in SVN 1.6. – geneorama Aug 29 '13 at 2:36
  • What you're trying here is not possible. There is no way to downgrade from 1.7 to 1.6 (only from 1.6 downwards) and 1.7 WC are not backwards compatible, i.e. 1.7 can't handle a 1.6 WC. Syncing by Dropbox is a no-go. You really need DVCS! – Johannes Aug 29 '13 at 7:54
  • I had a typo in my last comment, I meant to say "but it's not available in SVN 1.6" – geneorama Aug 29 '13 at 19:24
1

There is a little twist. You say you try svn update but the code shows svn upgrade which fails, then you say "so i tried svn upgrade".

My gut says you have a working copy on version 1.7 copied from somewhere and version 1.6 of subversion can't cope with it. The simplest solution would be to svn checkout a fresh working copy from the repository.

If you really need to downgrade your working copy from 1.7 to 1.6, then you have a problem, I am afraid.

The APR is a general purpose library that was developed for the Apache http server, but it is used by all subversion programs. Therefore you need to install it in order to build any subversion software. libapache-svn is a different matter.

  • I tried doing an update with apt-get because I wanted to install the newest SVN. For some reason on my other computer it won't install the newest version. – geneorama Aug 29 '13 at 2:41
  • You (or at least your gut) are right. I'm using dropbox, and the .svn folder is being synced and that's probably what's causing the problem (thanks for the insight there). Doing a new checkout would probably fix the problem, but that seems ridiculous to have two working copies in dropbox. I use dropbox to sync all the extra work, like Excel workbooks that I don't want to check into the project for size considerations. – geneorama Aug 29 '13 at 2:43
  • Can you tell me, is the APR thing for running an SVN server, or is it also necessary for compiling the client? Yes, this should be a second question... but I think the answer might be "I need to install 1.7 everywhere if I'm using dropbox" – geneorama Aug 29 '13 at 2:44
  • First of all Subversion is for 'syncing'. Do not let another syncing technology underneath mess with that. It can break locking, atomicity and whatnot in all kinds of subtle ways. Rule: One Computer, one working copy each, especially when you have different OS versions with different SVN version, which seem to be your problem here. If you want to sync between several working copies without committing to the repository, then use a DVCS like mercurial or git or frontend your SVN with mercurial or git. – Johannes Aug 29 '13 at 7:48
  • APR is also needed to compile the client. – Johannes Aug 29 '13 at 7:48
0

My apologies, but I didn't do a very good job at asking the question in the first place. In my defense, this was due to many different attempts at solving the problem and I lost track of the steps.

But, here is the answer as to why SVN commands were not working, and why upgrading was not working.

My problem was that I was using Dropbox to sync my repositories across computers, and I accidentally put a SVN 1.7 repo on a SVN 1.6 machine.

SVN said that I needed to upgrade, but the SVN upgrade is only available in 1.7, so I got the error "command does not exist" (somehow version 1.6 knows that it should exist, because it's in the error message!!!)

The other complication was that I couldn't upgrade to 1.7 on this machine using the typical apt-get (update/upgrade/install) commands, because the binary is not available for Ubuntu 12.04 (LTS) though the default PPA resources.

To upgrade to SVN 1.7 in Ubuntu 12.04 you need to add a new PPA. Instructions can be found here: Where can I find a Subversion 1.7 binary?
Note: Look at more than one answer in the link above. There is a ppa available from the SVN team, and at the time of writing this was not the selected answer

From what I've read (and my personal experience) it's possible sync SVN and Git projects across machines using Dropbox, even across operating systems. However, it's probably not a good idea, and the change in SVN versions caused some pretty big problems for me. Now, several of my tracked files have been overwritten in the project and I have to go though a messy process of checking out the entire project again and manually syncing unversioned files. The overwritten files were replaced with blank files that have the original name, but no content (and they appear to SVN to be the most current version, so a revert doesn't revert them).

Yes I know that keeping unversioned files is not ideal, but I have very good reasons for doing so.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.