Allow module name followed by a filename, e.g.

http://www.freebsd.org/cgi/cvsweb.cgi/mrouted/main.c
Fix the revision comparison function; diff's between branch and head
	are no longer reversed.
This commit is contained in:
Bill Fenner 1997-03-20 01:36:20 +00:00
parent 7eb3e626e9
commit 3d32f310e8
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/www/; revision=1331
2 changed files with 10 additions and 4 deletions

View file

@ -469,11 +469,14 @@ if (-d $fullname) {
print &html_footer;
print "</BODY></HTML>\n";
} else {
# Assume it's a module name with a potential path following it.
$where =~ s|/.*||;
$xtra = $&;
# Is there an indexed version of modules?
if (open(MODULES, "$cvsroot/CVSROOT/modules")) {
while (<MODULES>) {
if (/^${where}\s+(\S+)/o && -d "${cvsroot}/$1") {
&redirect($scriptname . '/' . $1);
&redirect($scriptname . '/' . $1 . $xtra);
}
}
}
@ -502,7 +505,7 @@ sub revcmp {
local(@r2) = split(/\./, $rev2);
local($a,$b);
while (($a = pop(@r1)) && ($b = pop(@r2))) {
while (($a = shift(@r1)) && ($b = shift(@r2))) {
if ($a != $b) {
return $a <=> $b;
}