[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.11 and 3.40

version 1.1.1.11, 2000/10/20 15:54:58 version 3.40, 2000/11/22 19:26:11
Line 42 
Line 42 
 # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF  # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 # SUCH DAMAGE.  # SUCH DAMAGE.
 #  #
 # $zId: cvsweb.cgi,v 1.103 2000/09/20 17:02:29 jumager Exp $  # $zId: cvsweb.cgi,v 1.104 2000/11/01 22:05:12 hnordstrom Exp $
 # $kId: cvsweb.cgi,v 1.37 2000/10/20 15:46:01 knu Exp $  # $Id$
 #  #
 ###  ###
   
Line 63  use vars qw (
Line 63  use vars qw (
     $is_links $is_lynx $is_w3m $is_msie $is_mozilla3 $is_textbased      $is_links $is_lynx $is_w3m $is_msie $is_mozilla3 $is_textbased
     %input $query $barequery $sortby $bydate $byrev $byauthor      %input $query $barequery $sortby $bydate $byrev $byauthor
     $bylog $byfile $defaultDiffType $logsort $cvstree $cvsroot      $bylog $byfile $defaultDiffType $logsort $cvstree $cvsroot
     $mimetype $defaultTextPlain $defaultViewable $allow_compress      $mimetype $charset $defaultTextPlain $defaultViewable
     $GZIPBIN $backicon $diricon $fileicon $fullname $newname      $allow_compress $GZIPBIN $backicon $diricon $fileicon
     $cvstreedefault $body_tag $body_tag_for_src      $fullname $newname $cvstreedefault
     $logo $defaulttitle $address      $body_tag $body_tag_for_src $logo $defaulttitle $address
     $long_intro $short_instruction $shortLogLen      $long_intro $short_instruction $shortLogLen
     $show_author $dirtable $tablepadding $columnHeaderColorDefault      $show_author $dirtable $tablepadding $columnHeaderColorDefault
     $columnHeaderColorSorted $hr_breakable $showfunc $hr_ignwhite      $columnHeaderColorSorted $hr_breakable $showfunc $hr_ignwhite
Line 1001  sub findLastModifiedSubdirs(@) {
Line 1001  sub findLastModifiedSubdirs(@) {
 sub htmlify_sub(&$) {  sub htmlify_sub(&$) {
     (my $proc, local $_) = @_;      (my $proc, local $_) = @_;
     local @_ = split(m`(<a [^>]+>[^<]*</a>)`i);      local @_ = split(m`(<a [^>]+>[^<]*</a>)`i);
     my ($linked, $result);      my $linked;
       my $result = '';
   
     while (($_, $linked) = splice(@_, 0, 2)) {      while (($_, $linked) = splice(@_, 0, 2)) {
         &$proc();          &$proc();
         $result .= $_;          $result .= $_ if defined($_);
         $result .= $linked;          $result .= $linked if defined($linked);
     }      }
   
     $result;      $result;
Line 1804  again:
Line 1805  again:
         if ($state eq "tags" && /^\S/) {          if ($state eq "tags" && /^\S/) {
             if (defined($tag) && (defined($symrev{$tag}) || $tag eq "HEAD")) {              if (defined($tag) && (defined($symrev{$tag}) || $tag eq "HEAD")) {
                 $revwanted = $tag eq "HEAD" ? $symrev{"MAIN"} : $symrev{$tag};                  $revwanted = $tag eq "HEAD" ? $symrev{"MAIN"} : $symrev{$tag};
                 ($branch = $revwanted) =~ s/\b0\.//;                  ($branch = $revwanted) =~ s/\.0\././;
                 ($branchpoint = $branch) =~ s/\.?\d+$//;                  ($branchpoint = $branch) =~ s/\.?\d+$//;
                 $revwanted = undef if ($revwanted ne $branch);                  $revwanted = undef if ($revwanted ne $branch);
             }              }
Line 2033  sub readLog($;$) {
Line 2034  sub readLog($;$) {
   
         foreach (reverse sort keys %symrev) {          foreach (reverse sort keys %symrev) {
             $rev = $symrev{$_};              $rev = $symrev{$_};
             if ($rev =~ /^((.*)\.)?\b0\.(\d+)$/) {              if ($rev =~ /^((.*)\.)0\.(\d+)$/) {
                 push(@branchnames, $_);                  push(@branchnames, $_);
                 #                  #
                 # A revision number of A.B.0.D really translates into                  # A revision number of A.B.0.D really translates into
Line 2046  sub readLog($;$) {
Line 2047  sub readLog($;$) {
                 # with the branch number 0.A, with the exception that                  # with the branch number 0.A, with the exception that
                 # it has no head to translate to if there is nothing on                  # it has no head to translate to if there is nothing on
                 # the branch, but I guess this can never happen?                  # the branch, but I guess this can never happen?
                 # (the code below gracefully forgets about the branch  
                 # if it should happen)  
                 #                  #
                   # Since some stupid people actually import/check in
                   # files with version 0.X we assume that the above cannot
                   # happen, and regard 0.X(.*) as a revision and not a branch.
                   #
                 $head = defined($2) ? $2 : "";                  $head = defined($2) ? $2 : "";
                 $branch = $3;                  $branch = $3;
                 $branchrev = $head . ($head ne "" ? "." : "") . $branch;                  $branchrev = $head . ($head ne "" ? "." : "") . $branch;
Line 2078  sub readLog($;$) {
Line 2081  sub readLog($;$) {
         my ($onlyonbranch, $onlybranchpoint);          my ($onlyonbranch, $onlybranchpoint);
         if ($onlyonbranch = $input{'only_with_tag'}) {          if ($onlyonbranch = $input{'only_with_tag'}) {
             $onlyonbranch = $symrev{$onlyonbranch};              $onlyonbranch = $symrev{$onlyonbranch};
             if ($onlyonbranch =~ s/\b0\.//) {              if ($onlyonbranch =~ s/\.0\././) {
                 ($onlybranchpoint = $onlyonbranch) =~ s/\.\d+$//;                  ($onlybranchpoint = $onlyonbranch) =~ s/\.\d+$//;
             }              }
             else {              else {
Line 2637  sub navigateHeader($$$$$) {
Line 2640  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 $  $kRevision: 1.37 $ -->';      print '<!-- CVSweb $zRevision: 1.104 $  $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 2840  sub fileSortCmp() {
Line 2843  sub fileSortCmp() {
 sub download_url($$;$) {  sub download_url($$;$) {
     my ($url,$revision,$mimetype) = @_;      my ($url,$revision,$mimetype) = @_;
   
     $revision =~ s/\b0\.//;      $revision =~ s/\.0\././;
   
     if (defined($checkoutMagic)      if (defined($checkoutMagic)
         && (!defined($mimetype) || $mimetype ne "text/x-cvsweb-markup")) {          && (!defined($mimetype) || $mimetype ne "text/x-cvsweb-markup")) {
Line 2996  sub http_header(;$) {
Line 2999  sub http_header(;$) {
             }              }
             select(GZIP);              select(GZIP);
             $gzip_open = 1;              $gzip_open = 1;
 #           print "<!-- gzipped -->" if ($content_type eq "text/html");  #           print "<!-- gzipped -->" if ($content_type =~ m|^text/html\b|);
         }          }
         else {          else {
             if ($is_mod_perl) {              if ($is_mod_perl) {
Line 3020  sub http_header(;$) {
Line 3023  sub http_header(;$) {
   
 sub html_header($) {  sub html_header($) {
     my ($title) = @_;      my ($title) = @_;
     my $version = '$zRevision: 1.103 $  $kRevision: 1.37 $'; #'      my $version = '$zRevision: 1.104 $  $Revision$'; #'
     http_header();      http_header($charset ne "" ? "text/html; charset=$charset" : "text/html");
     print <<EOH;      print <<EOH;
 <!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN"  <!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN"
  "http://www.w3.org/TR/REC-html40/loose.dtd">   "http://www.w3.org/TR/REC-html40/loose.dtd">
 <html>  <html>
   <head>
 <title>$title</title>  <title>$title</title>
 <!-- CVSweb $version -->  <!-- CVSweb $version -->
 </head>  </head>

Legend:
Removed from v.1.1.1.11  
changed lines
  Added in v.3.40

CVSweb