From owner-freebsd-cvsweb@FreeBSD.ORG Fri Nov 12 09:32:53 2004 Return-Path: Delivered-To: freebsd-cvsweb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C799416A4CE for ; Fri, 12 Nov 2004 09:32:53 +0000 (GMT) Received: from toe.terreactive.ch (gate.terreactive.ch [212.90.202.121]) by mx1.FreeBSD.org (Postfix) with SMTP id 808F443D49 for ; Fri, 12 Nov 2004 09:32:52 +0000 (GMT) (envelope-from chris@terreactive.ch) Received: from mailhost.terreactive.ch by toe.terreactive.ch via smtpd (for mx1.freebsd.org [216.136.204.125]) with SMTP; 12 Nov 2004 09:32:52 UT Received: (private information removed) Received: (private information removed) Date: Fri, 12 Nov 2004 10:27:35 +0100 From: Chris Straessle To: freebsd-cvsweb@FreeBSD.org Message-ID: <20041112092735.GA28354@terreactive.ch> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="KsGdsel6WgEHnImy" Content-Disposition: inline User-Agent: Mutt/1.4.2i X-Operating-System: Linux chris 2.4.25 Subject: cvsweb patch (supports now annotate for binaries) X-BeenThere: freebsd-cvsweb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS Web maintenance mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Nov 2004 09:32:53 -0000 --KsGdsel6WgEHnImy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline hello, I've needed annotate support also for binaries. the reason: I make backups from several systems with cvs, but i alwas set the 'b' flag when i check in the files, beucase if I backup a script file, or any files with a cvs header, i don't wan't cvs to change the $id$ field. (is not really a change, its just a backup) if I wanna watch these files with the fine webinterface, cvsweb I can't get an annotate... so I've written a small patch for it. maybe you like it too and implement this in the next release of cvsweb. :-) have a nice day, chris straessle -- ------------------------------------------------------------- addr://Rathausgasse 31, CH-5001 Aarau Tel://++41 62 823 9355 http://www.terreactive.com Fax://++41 62 823 9356 ------------------------------------------------------------- terreActive AG Wir sichern Ihren Erfolg. ------------------------------------------------------------- --KsGdsel6WgEHnImy Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="cvsweb-3.0.4-annotate.diff" --- cvsweb-3.0.4-orig/cvsweb.cgi 2004-11-12 10:21:20.000000000 +0100 +++ cvsweb-3.0.4/cvsweb.cgi 2004-11-12 10:25:32.000000000 +0100 @@ -1080,6 +1080,8 @@ my ($rev, $date, $log, $author, $filename, $keywordsubst) = @{$fileinfo{$file}}; my $isbinary = $keywordsubst eq 'b' ? 1 : 0; + $isbinary = 0; # annotate support for binary files + # 041112/chris $filesfound++; printf "\n", ($dirrow % 2) ? 'even' : 'odd'; @@ -1856,6 +1858,7 @@ # Don't worry about sending valid-requests, the server just needs to # support "annotate" and if it doesn't, there isn't anything to be done. print CVS_IN "UseUnchanged\n"; + print CVS_IN "Argument -F\n"; # to support annotate for binaries print CVS_IN "Argument -r\n"; print CVS_IN "Argument $rev\n"; print CVS_IN "Argument $where\n"; @@ -2090,6 +2093,7 @@ # Last checks whether we'll do markup or not. my $isbin = $keywordsubstitution && $keywordsubstitution =~ /b/; + $isbin = 0; # support markup, also for bin files. my $mimetype = getMimeType($fullname, $isbin); # If we still are not sure whether to do markup or not: @@ -3167,6 +3171,7 @@ } my $isbin = $keywordsubstitution =~ /b/; + $isbin = 0; # why not privide bin files ... my $mimetype = getMimeType($filename, $isbin); print "

\n "; --KsGdsel6WgEHnImy--