SVN Post-commit - workingcopy locked

1.1k views Asked by At

to explain my problem and server settings:

My repo is in /svn/repos/testrepo

My checkout, which is also reachable through apache http is in /var/www/testsite

post-commit:

#!/bin/sh
/svn/autoupdate/autoupdate

autoupdate.c, compiled with make autoupdate:

#include <stddef.h>
#include <stdlib.h>
#include <unistd.h>
int main(void)
{
  execl("/usr/bin/svn", "svn", "update","/var/www/testsite/",(const char *) NULL);
  return(EXIT_FAILURE);
}

When doing the post commit, this error occurs:

Error: post-commit hook failed (exit code 1) with output:
Error: svn: E155004: Run 'svn cleanup' to remove locks (type 'svn help cleanup' for details)
Error: svn: E155004: Working copy '/var/www/testsite' locked
Error: svn: E200031: sqlite[S8]: attempt to write a readonly database
Error: svn: E200031: Additional errors:
Error: svn: E200031: sqlite[S8]: attempt to write a readonly database

When I go over ssh to testsite and do an svn update, everything is fine. Also a cleanup does not show any errors.

Does someone know what is the problem?

1

There are 1 answers

1
Suresh Kumar On BEST ANSWER
  • This is happening because in linux based os the directories under /var/www/ doesn't have the write permission by default.
  • Give the write permission to directories under /var/www/ Example: If directory is xyz which is under /var/www/ (Directory structure is /var/www/xyz). First change the directory to /var/www/($ cd /var/www). Then give the permission to xyz directory (sudo chmod -R 777 xyz/)
  • Try to update the svn.