[Fusionforge-commits] r15115 - in trunk/src: plugins/scmsvn/common www/activity

Franck VILLAUME nerville at fusionforge.org
Tue Mar 13 22:43:41 CET 2012


Author: nerville
Date: 2012-03-13 22:43:40 +0100 (Tue, 13 Mar 2012)
New Revision: 15115

Modified:
   trunk/src/plugins/scmsvn/common/SVNPlugin.class.php
   trunk/src/www/activity/index.php
Log:
enhance feature : svn activity: add direct link to viewvc log entry

Modified: trunk/src/plugins/scmsvn/common/SVNPlugin.class.php
===================================================================
--- trunk/src/plugins/scmsvn/common/SVNPlugin.class.php	2012-03-13 19:19:48 UTC (rev 15114)
+++ trunk/src/plugins/scmsvn/common/SVNPlugin.class.php	2012-03-13 21:43:40 UTC (rev 15115)
@@ -548,7 +548,7 @@
 		global $last_user, $last_time, $last_tag, $time_ok, $start_time, $end_time,
 			$adds, $deletes, $updates, $commits, $date_key,
 			$usr_adds, $usr_deletes, $usr_updates,
-			$messages, $last_message, $times;
+			$messages, $last_message, $times, $revisions;
 		$group_id = $params['group'];
 		$project = group_get_object($group_id);
 		if (! $project->usesPlugin($this->name)) {
@@ -584,10 +584,10 @@
 					$result['section'] = 'scm';
 					$result['group_id'] = $group_id;
 					$result['ref_id'] = 'viewvc.php/?root='.$project->getUnixName();
-					$result['description'] = $message;
+					$result['description'] = $message.' (r'.$revisions[$i].')';
 					$result['realname'] = '';
 					$result['activity_date'] = $times[$i];
-					$result['subref_id'] = 0;
+					$result['subref_id'] = '&view=rev&revision='.$revisions[$i];
 					$params['results'][] = $result;
 					$i++;
 				}
@@ -708,13 +708,14 @@
 
 function SVNPluginStartElement($parser, $name, $attrs) {
 	global $last_user, $last_time, $last_tag, $time_ok,
-		$adds, $updates, $usr_adds, $usr_updates, $last_message, $messages, $times;
+		$adds, $updates, $usr_adds, $usr_updates, $last_message, $messages, $times, $revisions;
 	$last_tag = $name;
 	switch($name) {
 		case "LOGENTRY": {
 			// Make sure we clean up before doing a new log entry
 			$last_user = "";
 			$last_time = "";
+			$revisions[] = $attrs['REVISION'];
 			break;
 		}
 		case "PATH": {

Modified: trunk/src/www/activity/index.php
===================================================================
--- trunk/src/www/activity/index.php	2012-03-13 19:19:48 UTC (rev 15114)
+++ trunk/src/www/activity/index.php	2012-03-13 21:43:40 UTC (rev 15115)
@@ -264,7 +264,7 @@
 		switch (@$arr['section']) {
 			case 'scm': {
 				$icon = html_image('ic/cvs16b.png','','',array('alt'=>'Source Code'));
-				$url = util_make_link($arr['ref_id'],_('scm commit: ').$arr['description']);
+				$url = util_make_link('/scm/'.$arr['ref_id'].$arr['subref_id'],_('scm commit: ').$arr['description']);
 				break;
 			}
 			case 'commit': {




More information about the Fusionforge-commits mailing list