5

我尝试svn diff -r BEGIN_REVISION:END_REVISION 在终端中使用它,我得到了结果,但我需要一个 php 中的解决方案。我试过这段代码

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

在 php.ini 中。发生以下错误,

"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"

谁能帮我 ?

4

1 回答 1

4

出现此错误,因为该svn命令是以运行 webserver 进程(通常称为www-data)的用户身份运行的。默认情况下,subversion 将尝试将身份验证数据缓存到~/.subversion用户的目录中(/var/www用于您机器上的 webserver 用户)。

如果您不希望这样,您可以尝试将--no-auth-cache选项添加到您的命令中。

您可能还想添加--non-interactive.

于 2013-03-20T08:17:07.590 回答