[BACK]Return to cvsweb.cgi CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / cvsweb

Diff for /cvsweb/cvsweb.cgi between version 1.1.1.9 and 3.28

version 1.1.1.9, 2000/09/30 20:17:23 version 3.28, 2000/09/30 18:27:16
Line 43 
Line 43 
 # SUCH DAMAGE.  # SUCH DAMAGE.
 #  #
 # $zId: cvsweb.cgi,v 1.103 2000/09/20 17:02:29 jumager Exp $  # $zId: cvsweb.cgi,v 1.103 2000/09/20 17:02:29 jumager Exp $
 # $kId: cvsweb.cgi,v 1.30 2000/09/30 20:10:01 knu Exp $  # $Id$
 #  #
 ###  ###
   
Line 1141  sub doAnnotate($$) {
Line 1141  sub doAnnotate($$) {
     ($pathname = $where) =~ s/(Attic\/)?[^\/]*$//;      ($pathname = $where) =~ s/(Attic\/)?[^\/]*$//;
     ($filename = $where) =~ s/^.*\///;      ($filename = $where) =~ s/^.*\///;
   
       http_header();
   
       navigateHeader($scriptwhere,$pathname,$filename,$rev, "annotate");
       print "<h3 align=center>Annotation of $pathname$filename, Revision $rev</h3>\n";
   
     # this seems to be necessary      # this seems to be necessary
     $| = 1; $| = 0; # Flush      $| = 1; $| = 0; # Flush
   
Line 1150  sub doAnnotate($$) {
Line 1155  sub doAnnotate($$) {
     # the public domain.      # the public domain.
     # we could abandon the use of rlog, rcsdiff and co using      # we could abandon the use of rlog, rcsdiff and co using
     # the cvsserver in a similiar way one day (..after rewrite)      # the cvsserver in a similiar way one day (..after rewrite)
     $pid = open2($reader, $writer, "cvs -Rl server") || fatal ("500 Internal Error",      $pid = open2($reader, $writer, "cvs server") || fatal ("500 Internal Error",
                                                                "Fatal Error - unable to open cvs for annotation");                                                                 "Fatal Error - unable to open cvs for annotation");
   
     # OK, first send the request to the server.  A simplified example is:      # OK, first send the request to the server.  A simplified example is:
Line 1202  sub doAnnotate($$) {
Line 1207  sub doAnnotate($$) {
     # were nicer about buffering, then we could just leave it open, I think.      # were nicer about buffering, then we could just leave it open, I think.
     close ($writer) || die "cannot close: $!";      close ($writer) || die "cannot close: $!";
   
     http_header();  
   
     navigateHeader($scriptwhere,$pathname,$filename,$rev, "annotate");  
     print "<h3 align=center>Annotation of $pathname$filename, Revision $rev</h3>\n";  
   
     # Ready to get the responses from the server.      # Ready to get the responses from the server.
     # For example:      # For example:
     #     E Annotations for foo/xx      #     E Annotations for foo/xx
Line 1239  sub doAnnotate($$) {
Line 1239  sub doAnnotate($$) {
         }          }
         elsif ($words[0] eq "M") {          elsif ($words[0] eq "M") {
             $lineNr++;              $lineNr++;
             (my $lrev = substr($_, 2, 13)) =~ y/ //d;              my $lrev = substr ($_, 2, 13);
             (my $lusr = substr($_, 16,  9)) =~ y/ //d;              my $lusr = substr ($_, 16,  9);
             my $line = substr($_, 36);              my $line = substr ($_, 36);
             my $isCurrentRev = ($rev eq $lrev);  
             # we should parse the date here ..              # we should parse the date here ..
             if ($lrev eq $oldLrev) {              if ($lrev eq $oldLrev) {
                 $revprint = sprintf('%-8s', '');                  $revprint = "             ";
             }              }
             else {              else {
                 $revprint = sprintf('%-8s', $lrev);                  $revprint = $lrev; $oldLusr = "";
                 $revprint =~ s`\S+`<a href="${scriptwhere}${barequery}#rev$1">$&</A>`;  # `                  $revprint =~ s`^(\S+)`<a href="${scriptwhere}${barequery}#rev$1">$1</A>`;       # `
                 $oldLusr = '';  
             }              }
             if ($lusr eq $oldLusr) {              if ($lusr eq $oldLusr) {
                 $usrprint = '';                  $usrprint = "         ";
             }              }
             else {              else {
                 $usrprint = $lusr;                  $usrprint = $lusr;
             }              }
             $oldLrev = $lrev;              $oldLrev = $lrev;
             $oldLusr = $lusr;              $oldLusr = $lusr;
               # is there a less timeconsuming way to strip spaces ?
               ($lrev = $lrev) =~ s/\s+//g;
               my $isCurrentRev = ($rev eq $lrev);
   
             # Set bold for text-based browsers only - graphical              print "<b>" if ($isCurrentRev);
             # browsers show bold fonts a bit wider than regular fonts,              printf ("%8s%s%8s %4d:", $revprint, ($isCurrentRev ? "|" : " "), $usrprint, $lineNr);
             # so it looks irregular.  
             print "<b>" if ($isCurrentRev && $is_textbased);  
   
             printf ("%s%s %-8s %4d:",  
                     $revprint,  
                     $isCurrentRev ? '!' : ' ',  
                     $usrprint,  
                     $lineNr);  
             print spacedHtmlText($line, $d{'tabstop'});              print spacedHtmlText($line, $d{'tabstop'});
               print "</b>" if ($isCurrentRev);
             print "</b>" if ($isCurrentRev && $is_textbased);  
         }          }
         elsif ($words[0] eq "ok") {          elsif ($words[0] eq "ok") {
             # We could complain about any text received after this, like the              # We could complain about any text received after this, like the
Line 2486  sub navigateHeader($$$$$) {
Line 2478  sub navigateHeader($$$$$) {
     $swhere = urlencode($filename) if ($swhere eq "");      $swhere = urlencode($filename) if ($swhere eq "");
     print "<\!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">";      print "<\!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">";
     print "<HTML>\n<HEAD>\n";      print "<HTML>\n<HEAD>\n";
     print '<!-- CVSweb $zRevision: 1.103 $  $lRevision: 1.30 $ -->';      print '<!-- CVSweb $zRevision: 1.103 $  $Revision$ -->';
     print "\n<TITLE>$path$filename - $title - $rev</TITLE></HEAD>\n";      print "\n<TITLE>$path$filename - $title - $rev</TITLE></HEAD>\n";
     print  "$body_tag_for_src\n";      print  "$body_tag_for_src\n";
     print "<table width=\"100%\" border=0 cellspacing=0 cellpadding=1 bgcolor=\"$navigationHeaderColor\">";      print "<table width=\"100%\" border=0 cellspacing=0 cellpadding=1 bgcolor=\"$navigationHeaderColor\">";
Line 2841  sub http_header(;$) {
Line 2833  sub http_header(;$) {
   
 sub html_header($) {  sub html_header($) {
     my ($title) = @_;      my ($title) = @_;
     my $version = '$zRevision: 1.103 $  $kRevision: 1.30 $'; #'      my $version = '$zRevision: 1.103 $  $Revision$'; #'
     http_header();      http_header();
     print <<EOH;      print <<EOH;
 <!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN"  <!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN"

Legend:
Removed from v.1.1.1.9  
changed lines
  Added in v.3.28

CVSweb