Project

General

Profile

Error parsing svn output » History » Version 2

Anthony C, 2011-01-27 17:43

1 1 Anthony C
h1. Error parsing svn output
2
3
If after adding a repository you get an error "The entry or revision was not found in the repository" on the Repository tab, check in your log folder (e.g. /var/log/redmine/default) for production.log.
4
5 2 Anthony C
If you find this error in production.log there's probably an error when the redmine user runs the svn command:
6 1 Anthony C
> Error parsing svn output: #<REXML::ParseException: No close tag for /lists/list>
7
8
(Redmine still tries to parse the output of the svn command as XML, but errors aren't formatted as XML, thus the parse error.)
9
10
To troubleshoot try running the command as the redmine user to see what the error is, for example:
11
> sudo -u www-data svn list --xml 'https://svn.server.address/reponame'@HEAD
12
13
(You may have to add "www-data ALL=(ALL) NOPASSWD:ALL" to /etc/sudoers)
14
15
Now resolve the error so that you get only clean xml from the command every time.
16
17
If you get prompted to accept the server's certificate every time you need to give the redmine user a directory to store svn configuration in. Create a directory somewhere and make sure the redmine user is owner, for example:
18
> sudo mkdir /usr/share/redmine/svn
19
> sudo chown www-data:www-data /usr/share/redmine/svn
20
21
Open REDMINE_ROOT/lib/redmine/scm/adapters/subversion_adapter.rb and go to line 27 and change:
22
23
> SVN_BIN = "svn"
24
25
to, for example:
26
27
> SVN_BIN = "svn --config-dir /usr/share/redmine/svn"
28
29
Now you should be able to permanently accept the certificate.
30
31
Source(s):
32
http://www.redmine.org/boards/2/topics/11896
33
http://www.thinkplexx.com/learn/howto/scm/svn/fix-permanent-error-validating-server-certificate-problem-with-subversion