Date: Wed, 3 Jul 2002 14:34:20 -0400 From: Khachaturov Vassilii <Vassilii.Khachaturov@comverse.com> To: "'cvsweb development'" <freebsd-cvsweb@FreeBSD.ORG> Subject: RE: [PATCH] fileSortCmp() should properly weed out rogue non-dir files Message-ID: <6B1DF6EEBA51D31182F200902740436803B24BB7@mail-in.comverse.com>
next in thread | raw e-mail | index | archive | help
I have just looked at my last email=20 archived through the WWW interface at=20 http://docs.freebsd.org/mail/current/freebsd-cvsweb.html and found my MIME attachment displayed there as raw base64. Here comes the contents of the file for archival purposes (but I'm afraid that lines can become folded or that tabs can become messed up now... anyway, let me give it a try): --- cvsweb.cgi 2002/05/22 08:10:18 1.104 +++ cvsweb.cgi 2002/05/30 18:44:10 @@ -3,14 +3,15 @@ # cvsweb - a CGI interface to CVS trees. # # Written in their spare time by -# Bill Fenner <fenner@FreeBSD.org> (original work) -# extended by Henner Zeller <zeller@think.de>, -# Henrik Nordstrom <hno@hem.passagen.se> -# Ken Coar <coar@Apache.Org> -# Dick Balaska <dick@buckosoft.com> -# Akinori MUSHA <knu@FreeBSD.org> -# Jens-Uwe Mager <jum@helios.de> -# Ville Skytt=C4 <ville.skytta@iki.fi> (html cleanup) +# Bill Fenner <fenner@FreeBSD.org> (original = work) +# extended by Henner Zeller <zeller@think.de>, +# Henrik Nordstrom <hno@hem.passagen.se> +# Ken Coar <coar@Apache.Org> +# Dick Balaska <dick@buckosoft.com> +# Akinori MUSHA <knu@FreeBSD.org> +# Jens-Uwe Mager <jum@helios.de> +# Ville Skytt=C4 <ville.skytta@iki.fi> (html = cleanup) +# Vassilii Khachaturov <vassilii@tarunz.org> # # Based on: # * Bill Fenners cvsweb.cgi revision 1.28 available from: @@ -3359,10 +3362,12 @@ =20 if ($comp =3D=3D 0) { =20 - # Directories first, then sorted on name if no other sort critera - # available. - my $ad =3D ((-d "$fullname/$a") ? "D" : "F"); - my $bd =3D ((-d "$fullname/$b") ? "D" : "F"); + # Directories first, then version archives, then rogue files + # sorted on name if no other sort critera available. + my $ad =3D ((-d "$fullname/$a") ? 'D'=20 + : (defined($fileinfo{$af}) ? 'F' : 'R')); + my $bd =3D ((-d "$fullname/$b") ? 'D'=20 + : (defined($fileinfo{$bf}) ? 'F' : 'R')); ($c =3D $a) =3D~ s|.*/||; ($d =3D $b) =3D~ s|.*/||; $comp =3D ("$ad$c" cmp "$bd$d"); --- TODO.FreeBSD 2001/11/08 10:08:23 1.8 +++ TODO.FreeBSD 2002/05/30 18:44:16 @@ -3,8 +3,4 @@ =20 o Show fatal error messages properly when gzip encoding is enabled. =20 -o Fix sorting by age. - -o Fix mod_perl support. - o Make annotate work for any repository. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-cvsweb" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6B1DF6EEBA51D31182F200902740436803B24BB7>