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-- From owner-freebsd-cvsweb@FreeBSD.ORG Fri Nov 12 18:50:50 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 D51C116A4CE for ; Fri, 12 Nov 2004 18:50:50 +0000 (GMT) Received: from smtp2.pp.htv.fi (smtp2.pp.htv.fi [213.243.153.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id 96A7E43D39 for ; Fri, 12 Nov 2004 18:50:50 +0000 (GMT) (envelope-from scop@FreeBSD.org) Received: from [62.78.134.122] (cs78134122.pp.htv.fi [62.78.134.122]) by smtp2.pp.htv.fi (Postfix) with ESMTP id 472A8296B79 for ; Fri, 12 Nov 2004 20:50:49 +0200 (EET) From: Ville =?ISO-8859-1?Q?Skytt=E4?= To: freebsd-cvsweb@freebsd.org In-Reply-To: <20041112092735.GA28354@terreactive.ch> References: <20041112092735.GA28354@terreactive.ch> Content-Type: text/plain Organization: FreeBSD Message-Id: <1100285448.8353.18.camel@bobcat.mine.nu> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Fri, 12 Nov 2004 20:50:48 +0200 Content-Transfer-Encoding: 7bit Subject: Re: 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 18:50:50 -0000 On Fri, 2004-11-12 at 11:27, Chris Straessle wrote: > 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) The -ko keyword expansion mode in cvs is for this purpose. > 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. :-) I'm afraid I don't like it. Some effort has been put into cvsweb lately so that it would do the right thing wrt. binary files; this patch would essentially revert a subset of it, and in an uglyish way. Use -ko, not -kb for files you want annotations for instead. "cvs admin -ko" should do the trick for already committed files. One more minor note in case you still need the patch: > print CVS_IN "UseUnchanged\n"; > + print CVS_IN "Argument -F\n"; # to support annotate for binaries > print CVS_IN "Argument -r\n"; That shouldn't be necessary, see @annotate_options in cvsweb.conf instead.