Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I need to get svn_deff out put between two revisions in php

Tags:

php

svn

I tried using this svn diff -r BEGIN_REVISION:END_REVISION in terminal, I get results , But I need a solution in php. I tried this code

$svn_blame_array=exec("svn diff -r 125:126 --username abc --password abc753 ",$ret); 
print_r ( $ret );

in php. Below error is occurred ,

"You can avoid future appearances of this warning by setting the value of the 'store-plaintext-passwords' option to either 'yes' or 'no' in /var/www/.subversion/servers.
Store password unencrypted (yes/no)? svn: Can't read stdin: End of file found"

Can anyone help me ?

like image 877
KTAnj Avatar asked Oct 04 '22 16:10

KTAnj


1 Answers

This error appears, because the svn command is run as the user who runs the webserver process (often called www-data). By default subversion will try to cache authentication data into the ~/.subversion directory of a user (which is /var/www for the webserver user on your machine).

If you don't want that, you can try to add the --no-auth-cache option to your command.

You may also want to add --non-interactive.

like image 147
Michael Härtl Avatar answered Oct 10 '22 04:10

Michael Härtl