我尝试在终端中使用此 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 中。发生以下错误,
"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"
谁能帮帮我?
最佳答案
出现这个错误,是因为svn
命令是以运行webserver进程的用户身份运行的(通常叫做www-data
)。默认情况下,subversion 将尝试将身份验证数据缓存到用户的 ~/.subversion
目录中(对于您计算机上的网络服务器用户,该目录是 /var/www
)。
如果你不想这样,你可以尝试在你的命令中添加 --no-auth-cache
选项。
您可能还想添加--non-interactive
。
关于php - 我需要在 php 的两个修订之间放置 svn_deff,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15517548/