=================================================================== RCS file: /cvs/cvsweb/cvsweb.cgi,v retrieving revision 1.1.1.12 retrieving revision 3.37 diff -u -p -r1.1.1.12 -r3.37 --- cvsweb/cvsweb.cgi 2000/11/04 19:19:48 1.1.1.12 +++ cvsweb/cvsweb.cgi 2000/10/20 15:46:01 3.37 @@ -42,8 +42,8 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $zId: cvsweb.cgi,v 1.104 2000/11/01 22:05:12 hnordstrom Exp $ -# $kId: cvsweb.cgi,v 1.39 2000/11/04 15:32:17 knu Exp $ +# $zId: cvsweb.cgi,v 1.103 2000/09/20 17:02:29 jumager Exp $ +# $Id: cvsweb.cgi,v 3.37 2000/10/20 15:46:01 knu Exp $ # ### @@ -1001,13 +1001,12 @@ sub findLastModifiedSubdirs(@) { sub htmlify_sub(&$) { (my $proc, local $_) = @_; local @_ = split(m`(]+>[^<]*)`i); - my $linked; - my $result = ''; + my ($linked, $result); while (($_, $linked) = splice(@_, 0, 2)) { &$proc(); - $result .= $_ if defined($_); - $result .= $linked if defined($linked); + $result .= $_; + $result .= $linked; } $result; @@ -1805,7 +1804,7 @@ again: if ($state eq "tags" && /^\S/) { if (defined($tag) && (defined($symrev{$tag}) || $tag eq "HEAD")) { $revwanted = $tag eq "HEAD" ? $symrev{"MAIN"} : $symrev{$tag}; - ($branch = $revwanted) =~ s/\.0\././; + ($branch = $revwanted) =~ s/\b0\.//; ($branchpoint = $branch) =~ s/\.?\d+$//; $revwanted = undef if ($revwanted ne $branch); } @@ -2034,7 +2033,7 @@ sub readLog($;$) { foreach (reverse sort keys %symrev) { $rev = $symrev{$_}; - if ($rev =~ /^((.*)\.)0\.(\d+)$/) { + if ($rev =~ /^((.*)\.)?\b0\.(\d+)$/) { push(@branchnames, $_); # # A revision number of A.B.0.D really translates into @@ -2047,11 +2046,9 @@ sub readLog($;$) { # with the branch number 0.A, with the exception that # it has no head to translate to if there is nothing on # 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 : ""; $branch = $3; $branchrev = $head . ($head ne "" ? "." : "") . $branch; @@ -2081,7 +2078,7 @@ sub readLog($;$) { my ($onlyonbranch, $onlybranchpoint); if ($onlyonbranch = $input{'only_with_tag'}) { $onlyonbranch = $symrev{$onlyonbranch}; - if ($onlyonbranch =~ s/\.0\././) { + if ($onlyonbranch =~ s/\b0\.//) { ($onlybranchpoint = $onlyonbranch) =~ s/\.\d+$//; } else { @@ -2640,7 +2637,7 @@ sub navigateHeader($$$$$) { $swhere = urlencode($filename) if ($swhere eq ""); print "<\!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">"; print "\n\n"; - print ''; + print ''; print "\n$path$filename - $title - $rev\n"; print "$body_tag_for_src\n"; print ""; @@ -2843,7 +2840,7 @@ sub fileSortCmp() { sub download_url($$;$) { my ($url,$revision,$mimetype) = @_; - $revision =~ s/\.0\././; + $revision =~ s/\b0\.//; if (defined($checkoutMagic) && (!defined($mimetype) || $mimetype ne "text/x-cvsweb-markup")) { @@ -3023,7 +3020,7 @@ sub http_header(;$) { sub html_header($) { my ($title) = @_; - my $version = '$zRevision: 1.104 $ $kRevision: 1.39 $'; #' + my $version = '$zRevision: 1.103 $ $Revision: 3.37 $'; #' http_header(); print <