Login | Register
My pages Projects Community openCollabNet

Discussions > cvs > CVS update: /kamikaze-qscm/src/kamikaze-qscm/hooks/, /kamikaze-qscm/src/kamikaze-qscm/html/

kamikaze-qscm
Discussion topic

Hide all messages in topic

All messages in topic

CVS update: /kamikaze-qscm/src/kamikaze-qscm/hooks/, /kamikaze-qscm/src/kamikaze-qscm/html/

Reply

Author jduprey
Full name John Duprey
Date 2004-09-23 21:07:10 PDT
Message User: jduprey
Date: 04/09/23 21:07:10

Modified:
 /kamikaze-qscm/src/k​amikaze-qscm/hooks/
  commit2db.pl
 /kamikaze-qscm/src/k​amikaze-qscm/html/
  index.php, query.php

Log:
 Fixed the following bugs:
     http://kamikaze-qscm​.tigris.org/issues/s​how_bug.cgi?id=3
     http://kamikaze-qscm​.tigris.org/issues/s​how_bug.cgi?id=8
     http://kamikaze-qscm​.tigris.org/issues/s​how_bug.cgi?id=10
     http://kamikaze-qscm​.tigris.org/issues/s​how_bug.cgi?id=11
     http://kamikaze-qscm​.tigris.org/issues/s​how_bug.cgi?id=12
     http://kamikaze-qscm​.tigris.org/issues/s​how_bug.cgi?id=13
 
 Changed display to only show results or query form - not both.
 Added menu option to edit query after submit - "Modify"
 

File Changes:

Directory: /kamikaze-qscm/src/k​amikaze-qscm/hooks/
====================​====================​==========

File [changed]: commit2db.pl
Url: http://kamikaze-qscm​.tigris.org/source/b​rowse/kamikaze-qscm/​src/kamikaze-qscm/ho​oks/commit2db.pl?r1=​1.2&r2=1.3
Delta lines: +12 -8
--------------------
--- commit2db.pl 22 Sep 2004 03:35:18 -0000 1.2
+++ commit2db.pl 24 Sep 2004 04:07:10 -0000 1.3
@@ -46,9 +46,10 @@
            &read_from_proce​ss($svnlook, 'youngest', $repos);
        my $latestRev = shift @youngestRevLines;
 
- if( $latestRev eq "failed with this output" )
+ if( $latestRev =~ /failed with this output/ )
            {
- die( "Failed to find the latest revision: $latestRev" );
+ die( "Failed to find the latest revision for $repos because: " .
+ " $latestRev", @youngestRevLines );
            }
 
        print("Rebuilding commit log info for $repos revisions 1 - $latestRev.\n");
@@ -70,14 +71,12 @@
 
    # Get the author, date, and log from svnlook.
    my @svnlooklines = &read_from_proce​ss($svnlook, 'info', $repos, '-r', $rev);
- my $author = shift @svnlooklines;
- my $date = shift @svnlooklines;
- shift @svnlooklines;
- my @log = map { "$_\n" } @svnlooklines;
 
- if( $author eq "failed with this output" )
+ my $author = shift @svnlooklines;
+ if( $author =~ /failed with this output/ )
    {
- warn( "Failed to get information about this revision: $rev." );
+ warn( "Failed to get information about revision $rev because:\n\t"
+ . $author . " ", @svnlooklines );
       return(1);
    }
    if( 0 == length($author) )
@@ -90,6 +89,11 @@
       warn( "\"$author\" user/author truncated to the first 254 chars for revision $rev." );
       $author = substr( $author, 0, 254 );
    }
+
+ my $date = shift @svnlooklines;
+ shift @svnlooklines;
+ my @log = map { "$_\n" } @svnlooklines;
+
    
    # Figure out what directories have changed using svnlook.
    my @dirschanged = &read_from_proce​ss($svnlook, 'dirs-changed', $repos,

Directory: /kamikaze-qscm/src/k​amikaze-qscm/html/
====================​====================​=========

File [changed]: index.php
Url: http://kamikaze-qscm​.tigris.org/source/b​rowse/kamikaze-qscm/​src/kamikaze-qscm/ht​ml/index.php?r1=1.1​&r2=1.2
Delta lines: +5 -1
-------------------
--- index.php 21 Sep 2004 04:25:15 -0000 1.1
+++ index.php 24 Sep 2004 04:07:10 -0000 1.2
@@ -16,7 +16,11 @@
   <TR>
     <TD valign="top">
       <?php
+ if( !isset( $_REQUEST['action'] ) ||
+ $_REQUEST['action'] != "Submit" )
+ {
       $query->displayQueryForm();
+ }
         ?>
     </TD>
     <TD valign="top">

File [changed]: query.php
Url: http://kamikaze-qscm​.tigris.org/source/b​rowse/kamikaze-qscm/​src/kamikaze-qscm/ht​ml/query.php?r1=1.2​&r2=1.3
Delta lines: +64 -33
---------------------
--- query.php 22 Sep 2004 03:35:19 -0000 1.2
+++ query.php 24 Sep 2004 04:07:10 -0000 1.3
@@ -129,14 +129,16 @@
                         author.user,
                         repository.alias,
                         revision.rev,
+ revision.rep_id,
                         resource.resource,
                         resource.action,
                         revision.log
                     FROM
                         author,
                         repository,
- revision,
- resource
+ revision
+ LEFT JOIN
+ resource on revision.id = resource.rev_id
                     WHERE [WHERE_CLAUSE]
                     ORDER BY
                         repository.alias,
@@ -177,12 +179,18 @@
         print( "<TD><a href=\"" .
                          $_SERVER['PHP_SELF'] . "\">Reset</a​></TD>" );
     print( "<TD><a href=\"" . $_SERVER['PHP_SELF'] . "?" .
- $_SERVER['QUERY_STRING'] . "\">Re-Submit​</a></TD>" );
+ str_replace("action=Submit", "action=Modify",
+ $_SERVER['QUERY_STRING']) . "\">Modify</a​></TD>" );
+ print( "<TD><a href=\"" . $_SERVER['PHP_SELF'] . "?" .
+ $_SERVER['QUERY_STRING'] . "\">Re-submit​</a></TD>" );
+
         print( "<TD><a href=\"#results\"​>Results</a>​</TD>" );
     }
     else
     {
- print( "<TD>Reset</TD>" );
+ print( "<TD><a href=\"" .
+ $_SERVER['PHP_SELF'] . "\">Reset</a​></TD>" );
+ print( "<TD>Modify</TD>" );
         print( "<TD>Re-submit​</TD>" );
         print( "<TD>Results</TD>" );
     }
@@ -259,7 +267,7 @@
         }
         if( $actionList != "" )
         {
- $actionList = '(' . $actionList . ')';
+ $actionList = '(' . $actionList . ' OR resource.action IS NULL)';
         }
 
         //-- BUILD date clause
@@ -426,7 +434,7 @@
       <FORM name="svnquery" action="index.php">
         <FIELDSET>
           <LEGEND title="Search subversion repostiories for commit information">Kami​kaze</LEGEND>
- <TABLE width="330">
+ <TABLE width="350">
             <TR>
               <TD valign="top">
                   <FIELDSET>
@@ -467,11 +475,11 @@
                 <TD colspan="2">
                 <FIELDSET>
                     <LEGEND>Path​</LEGEND>
- <INPUT name="pathContains" type="text" size="33" title="Enter a substring to match against the path. Leave it blank to skip this criteria." value="
+ <INPUT name="pathContains" type="text" size="33" title="Enter a substring to match against the path. Leave it blank to skip this criteria." value=
 END;
- echo "$this->pathContains";
+ echo "\"$this->pathContains\"";
 print <<<END
- ">
+ >
                 </FIELDSET>
                 </TD>
             </TR>
@@ -479,11 +487,11 @@
                 <TD colspan="2">
                 <FIELDSET>
                     <LEGEND>Log​</LEGEND>
- <INPUT name="logContains" type="text" size="33" title="Enter a substring to match against the log text. Leave it blank to skip this criteria." value="
+ <INPUT name="logContains" type="text" size="33" title="Enter a substring to match against the log text. Leave it blank to skip this criteria." value=
 END;
- echo "$this->logContains";
+ echo "\"$this->logContains\"";
 print <<<END
- ">
+ >
                 </FIELDSET>
                 </TD>
             <TR>
@@ -695,12 +703,20 @@
                     {
                         $userCount++;
                         $userList = $userList . "$userName@$repos ($count revisions), ";
- $reposList = $reposList . "$repos, ";
+ $reposList[$repos] = $repos;
                     }
                 }
         }
         print( "<LI>$userCount authors: $userList</LI>\n" );
- print( "<LI>" . count($this->relevantUsers) . " repositories: $reposList</LI>" );
+ print( "<LI>" . count($reposList) . " repositories: " );
+ if( 0 < count($reposList) )
+ {
+ foreach( array_keys($reposList) as $repos )
+ {
+ print( "$repos, " );
+ }
+ }
+ print( "</LI>" );
         print( "<LI>" . $this->relevantRevs . " total revisions</LI>\n" );
 print <<<END
         </UL>
@@ -796,8 +812,23 @@
                                                      "log" => $row["log"],
                                                      "resources" => array() );
                         }
- array_push($this-​>parsedResults[$cu​rRep][$curRev]["res​ources"],
- array( "path" => $row[resource], "action" => $row["action"] ) );
+ if( isset( $row["resource"] ) &&
+ isset( $row["action"] ) )
+ {
+ array_push(
+ $this->parsedRes​ults[$curRep][$cur​Rev]["resources"],
+ array( "path" => $row["resource"],
+ "action" => $row["action"] ) );
+ }
+ else
+ {
+ array_push(
+ $this->parsedRes​ults[$curRep][$cur​Rev]["resources"],
+ array( "path" => "**EMPTY**",
+ "action" => "**NULL**" ) );
+
+ }
+
                         
                 }
         }




--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: cvs-unsubscribe@kami​kaze-qscm.tigris.org​
For additional commands, e-mail: cvs-help@kamikaze-qs​cm.tigris.org
Messages per page: