30

Our build server runs Jenkins 1.502 with Subversion plugin upgraded to version 1.45. This plugin uses svnkit-1.7.6-jenkins-1.jar.

Also we have SVN client 1.7.8 installed.

Jenkins successfully checks out source code from SVN repository. But when I go to workspace directory and try to run some svn command manually, it fails:

# cd /var/lib/jenkins/jobs/myproject/workspace/
# svnversion
svn: E155036: Working copy '/var/lib/jenkins/jobs/myproject/workspace' is too old (format 8, created by Subversion 1.4)

The error message indicates that working copy was created by SVN 1.4, but version of svnkit is 1.7.6. How could it be?

I searched entire file system, there are no any other svnkit-*.jar files.

Andrey
  • 3,667
  • 6
  • 27
  • 36
  • Have you tried checking out a fresh workspace after the upgrade instead of using one which was created before upgrade? – Shiva Kumar Feb 27 '13 at 17:00
  • @ShivaKumar, I can upgrade workspace and then work with it. But I wonder why it is created in version 1.4. This prevents me to use automatic tools. – Andrey Feb 28 '13 at 13:37

2 Answers2

69

There is an option in jenkins to tell svn which working copy format to use(manage jenkins > configure system), look for a 'Subversion Workspace Version' pulldown - it's likely set to 1.4. change it to the latest version in the list.

thekbb
  • 7,668
  • 1
  • 36
  • 61
  • 4
    This did the trick. Just needed to blow away the repos to let the change take effect – tourdownunder Aug 15 '13 at 02:07
  • The repos are in [jenkins]/workspace/jenkins-project-name – vinnyjames Jan 12 '17 at 07:20
  • After making the above change, you can fix up existing repos from the command line with `svn upgrade`. See svn source file [wc.h](http://svn.apache.org/repos/asf/subversion/trunk/subversion/libsvn_wc/wc.h) for the non-obvious mapping of svn client version to working copy format. – Robert Calhoun May 21 '19 at 14:31
  • Many thanks for this! Shame it is hidden in such an obscure place - there should at least be some pointer to that from either the plugin install information or the configuration section on jobs. – Michael Firth May 21 '21 at 09:40
6

I wasn't able to downgrade subversion to 1.7. (due to dependencies).

Another way to fix this is add a "Pre Step / Execute Shell" with command svn upgrade respectively cd trunk; svn upgrade in the job configuration.

This works with subversion 1.8.8 on Ubuntu 14.04.

stacker
  • 68,052
  • 28
  • 140
  • 210