Purpose
This portlet is for those who use Subversion and want to find log entries in Subversion which related to a particular bug. Note that this requires that Subversion be located on the same server as the portlet (so that it can execute the svn commands) and that the repository be available to the file system as a direct PATH, not a url.
This widget allows you to define the path and title of repositories you wish to appear in a dropdown list. You may then choose which repository to list either all log files (no search term entered) or those log file entries which match a particular word or phrase you enter. This isn’t sophisticated searching, just an indexOf() your word or phrase in the log entry. But, it does help you locate commits related to certain bugs – if – you’re careful about including the bug ID or something specific pertaining to the bug in the message at the time of the commit.
Screenshots


Installation
Note: This version will only work with Bugs Dashboard v3.2.2 and up due to the use of the “params” parameter.
To use the SVNLog Widget, the server on which the portlet is running must have subversion installed and access to the file system where the repository is located. The reason for this is that the subversion command “svnlook” used to list the log file entries requires a path, not a url.
To use the SVNLog Widget, do the following:
- Copy the SVNLog.class file at com/wmpnj/bugz/portlets into the deployed web application directory; i.e. /webapps/bugs/WEB-INF/classes/com/wmpnj/bugz/portlets. This may require that you also copy the directory “portlets” if this is the first portlet you’re deploying.
- Copy the svnlog.properties file to the deployed web application classes directory; i.e. /webapps/bugs/WEB-INF/classes. Edit this file with a text editor. Change the first line (“total”) to reflect the number of Subversion repositories you wish to list in the dropdown. For each repository, you must list the title you wish to see displayed in the dropdown and the path to the repository. Please note that this is the path on the file system, not a url (see the first paragraph above).
- Update the dwr.xml file in the deployed web application WEB-INF directory; i.e. /webapps/bugs/WEB-INF. Edit the file with a text editor and add the following after the last </create> statement:
<create creator="new" javascript="Log"> <param name="class" value="com.wmpnj.bugz.portlets.SVNLog" /> </create>
- Update the portlets.properties file in the deployed web application classes directory; i.e. /webapps/bugs/WEB-INF/classes:
- Update the first line by incrementing the count of portlets by 1
- Add the following in the position that you want the portlet to appear within your desired column. For example, if you want the SVNLog to appear at the top of the right-most column, you must insert this ahead of any other portlet whose column is “2″. After adding the following block, you MUST then renumber the portlets appropriately, beginning with 0, i.e. “portlet0″, “portlet1″.
portlet5.title=SVN Log portlet5.column=1 portlet5.package=com.wmpnj.bugz.portlets.SVNLog portlet5.className=Log portlet5.method=getText portlet5.stylesheet= portlet5.javascript= portlet5.desc=Subversion log portlet5.call= portlet5.restrictTo= portlet5.params=DWRUtil.getValue("repo"),DWRUtil.getValue("search")
You may change the title and column, but do NOT change the package, className, or method!
