Dependency Graph
View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006011 | mantisbt | other | public | 2005-07-25 15:20 | 2010-09-19 03:11 |
Reporter | pneff | Assigned To | dhx | ||
Priority | normal | Severity | feature | Reproducibility | always |
Status | closed | Resolution | won't fix | ||
Product Version | 1.0.0rc1 | ||||
Summary | 0006011: CVS Integration - added links to ViewCVS | ||||
Description | I have implemented a small patch to checkin.php. The existing configuration variable g_cvs_web is now used to link to ViewCVS. This patch should be backward compatible, because the new routine only kicks in if g_cvs_web is defined and command line parameters are used. But in order to be used, the following must be done in the CVSROOT directory. 1) 2) If checkin.php is already available in loginfo, just add the command line params. You will find the patch attached. | ||||
Tags | No tags attached. | ||||
Attached Files | mantis-checkin-2005-07-25.patch (1,274 bytes)
--- checkin.php.old Mon Jul 25 21:09:21 2005 +++ checkin.php Mon Jul 25 21:08:09 2005 @@ -32,6 +32,26 @@ define("STDIN", fopen('php://stdin','r')); } + # If command line arguments are given, the format is as follows: + # checkin.php directory {file rev_old rev_new} + $cvslinks = ''; + if (count($argv) > 0 && !empty($g_cvs_web)) { + array_shift($argv); + $cvs_dir = array_shift($argv); + + while (count($argv) >= 3) { + $cvs_file = array_shift($argv); + $cvs_version_prev = array_shift($argv); + $cvs_version_new = array_shift($argv); + if ($cvs_version_prev == 'NONE') { + // new file + $cvslinks .= $g_cvs_web.$cvs_dir."/".$cvs_file."?rev=".$cvs_version_new."&content-type=text/vnd.viewcvs-markup\n"; + } else { + $cvslinks .= $g_cvs_web.$cvs_dir."/".$cvs_file.".diff?r1=".$cvs_version_prev."&r2=".$cvs_version_new."\n"; + } + } + } + # Detect references to issues + concat all lines to have the comment log. $t_commit_regexp = config_get( 'source_control_regexp' ); $t_commit_fixed_regexp = config_get( 'source_control_fixed_regexp' ); @@ -52,6 +72,10 @@ $t_fixed_issues[] = $t_matches[1][$i]; } } + } + + if (!empty($cvslinks)) { + $t_comment .= "\n\n$cvslinks"; } # If no issues found, then no work to do. | ||||