Sunday, April 24, 2016

Unable to run svn commands on a repository version 1.7


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.



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.


No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...