[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

PHP script for viewing subversion repositories

From: Martin MAURER <martin.maurer_at_email.de>
Date: 2003-08-23 20:19:31 CEST

Hi all,

I recently wrote a small PHP script which displays subversion
repositories similar (but not as powerful) to viewcvs.
This script calls the svn binary of your system and parses the output.
I wrote it as I had some problems with viewcvs cvs version (first not
getting it installed easily and then not doing some things - diff - for
me correctly).

Although this script is not well tested and even lacking some features
in respect to viewcvs it works well fo me, and so I decided to send it
to this list, so maybe other people could use it too. I most likely wont
do a lot of further changes (as it does what i needed it to do), but if
anyone has problems "installing" it, i could of course try to help out -
just send a mail.
If anyone improves the script I would be happy to get a copy of it.

Please know, that there may be security problems that I don't know of.
(I am not a professional PHP programmer, and this script executes shell
commands - so don't use this script on publically available servers as
long as no one rechecked it for problems regarding security - you have
been warned.)

Things that (should) work:
- browsing the repository
- viewing the logs of a file
- retrieving diffs between a file+revision and the previous revision
- manually switching to a specific revision

Things that dont't work / are missing:
- error handling
- show some sort of revision log for a directory
  (didn't know how to get the revisions of a directory where its direct
  childs changed using an elegant way.)
- not tested on _big_ archives

To install it, simply put the .php file into some direcotry on your
PHP-enabled webserver (you may rename the php file without breaking
something) and edit the top part of the file.
(you have to specify your repositories and such things)


PS: I am not on this list any more - so CC for any feedback/question/...

Received on Sun Aug 24 07:23:19 2003

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.