Subversion log viewer in coldfusion

You know how incredibly handy svn is. Life saving even sometimes. The commit messages accompanying the commits are also very informative for change logs of your software, as attachment to your invoice, etcetera.

But how do you get these commit messages from subversion in a readable format?
For this, I created the subversion log file viewer, in coldfusion off course. You can see a live example here, and even directly use it online!

There are a lot of options and filters:

  • Can show logs for both checked out directories and svn-urls.
  • Add the log viewer in (a sub-directory of) any versioned directory to see it's svn log.
  • Show all files for all revisions (and show/hide them via javascript)
  • Download the log as a PDF file
  • Filters based on: committer name / date from / date untill / revision start and end number

Necessary prerequisites for install on your server

You must have the subversion executable on the machine you are running the script on. For windows, you can install svn.exe inside C:/subversion/svn.exe. For all other platforms, either change the path to the svn executable in subversion.cfc, or have the directory with the svn executable in your system path, so we can call it by <cfexecute name="svn" ...> (at least Mac OSX has svn already installed; go Mac go!)

Coldfusion tags <cfexecute>, createObject(), <cfinvoke> are used, so must be enabled.

The files + full download

  • Download the complete package here
  • subversion.cfc (view source): a prety basic component which handles the subversion repository calls. You have to instantiate the object with the init function: <cfset svn_obj = createObject("component", "subversion").init(user="your-username", pass="your-password", svnPath="svn://server/repos/trunk") />
  • showlog.cfm (view source): the file which does all the magic. Includes the form with all the filters and subversion parameters, parses the subversion info data, and displays it to screen or as PDF.
  • jquery...js, jquery-ui...js, calendar.png, /custom-theme/: jquery files used in showlog.cfm, for date-picking, and some other javascript actions.

Usage

Just unpack everything, upload it to your server, and call the showlog.cfm file. It's that easy!

del.icio.us Digg StumbleUpon Facebook Technorati Fav reddit Google Bookmarks
| Viewed 4725 times

No comments yet.

(will not be published)
Leave this field empty