Thursday, 1 February 2007
Working a PHP frontend to Subversion (SVN) |
| |
|
| |
In a new post, over his blog, Robert Swartout discusses how to work with a PHP frontend to Subversion (SVN). He shares the information that the frontend needed to be designed in such a way that each developer could access their working copies and make the full range of actions against them. He also uses an AJAX setup so that pages would be quickly loaded and updated by a single toggle of a folder.
He lays out the issues that he faced in carrying out the process. The first issue that he had to deal with was when a SVN command was made, it needed to be issued as the owner of the code so that SVN could track edits correctly. After running a search, he found that there was not a viable Apache MPM that would serve virtual hosts under different users and groups. Finally, he got a way out to setup a proxy and redirect requests to developer.dev.domain.com to its own instance of Apache running as the user and group ‘developer’. This would ensure that all SVN commands would run as ‘developer’ when executed, he suffices.
He then goes on to the next step of setting up the interface. He lists out the features that are working. They are:
- create working copy from repository (svn checkout)
- delete working copy
- SVN add
- SVN blame
- SVN commit
- SVN copy
- SVN delete
- SVN diff
- SVN move
- SVN propset
- Search files (via a grep/find combination, omitting .svn folders)
- SVN log
- SVN rename
- SVN status
- Update local working copy
- Update stage environment
- Publish stage environment
He concludes the post by sharing a few points that he learnt in course of running this procedure. He learnt that when executing a SVN command via the PHP function exec() he needs to add the flag –config-dir=$USER_HOME_DIR/.subversion or where ever the users .subversion folder is located. Also if a command does not seem to be executing correctly add ‘2>&1’ without quotations to the command being run and it will return any error messages through the variable for exec(); he says.
|
| |
|
Read the Post
|
| |
|
|
| |
|
|
| |
|