I have SVN server to control source code version
I can checkout my code when I use TortoiseSVN or use command line.
Here is some information:
- SVN server
- Checkout code by using TortoiseSVN in Windows
- Chechout code by using commandline in Ubuntu (Web server)
I use this command
root@controller1:/var/www/onecloud# svn co --force --username hoang --password gcsvn123 http://203.162.141.79/onecloud /var/www/onecloud
Then I write PHP code to update version auto (don’t use TortoiseSVN or use command line).
error_reporting(-1); ini_set('display_errors', 'On'); $result= exec('svn co --force --username hoang --password gcsvn123 http://203.162.141.79/onecloud /var/www/onecloud 2>&1',$out); print_r($out);
But when I run my code, it show this error:
Array ( [0] => svn: E155004: Run 'svn cleanup' to remove locks (type 'svn help cleanup' for details) [1] => svn: E155004: Working copy '/var/www/onecloud' locked [2] => svn: E200031: sqlite[S8]: attempt to write a readonly database [3] => svn: E200031: Additional errors: [4] => svn: E200031: sqlite[S8]: attempt to write a readonly database )
I have run command line svn cleanup
, but it seem doesn’t work.
Not:
My SVN server is 203.162.141.79 My web server is 203.162.141.26
Advertisement
Answer
I found diractory .svn
in my code after checkput
When I use two command
chmod -R 777 .svn/
chown www-data:www-data .svn/
It works.