Answer the question
In order to leave comments, you need to log in
SVN Commit via PHP
There is a following task. When the controller is called, one of the files is updated, you must immediately commit it to the server.
The solution that was first noticed is the pecl's svn php library. But, it works through a stump-deck. The second option is to use system/exec. Not yet considered.
Does anyone have any experience and would like to share it?
Answer the question
In order to leave comments, you need to log in
/**
* $ sudo pecl install svn
* OR
* $ sudo apt-get install php5-svn
*
* http://www.php.net/manual/ru/svn.installation.php
*/
// SVN_FILE - файл для коммита
svn_auth_set_parameter(SVN_AUTH_PARAM_DEFAULT_USERNAME, 'username);
svn_auth_set_parameter(SVN_AUTH_PARAM_DEFAULT_PASSWORD, 'userpassword');
svn_commit('this_is_comment', array(SVN_FILE));
And why is the option with the execution of the command not considered, if not a secret?
I don’t quite understand why this might be needed, but I would do it through the flag + crontab + bash script
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question