From owner-cvs-all Fri Sep 24 5:18: 3 1999 Delivered-To: cvs-all@freebsd.org Received: from florence.pavilion.net (florence.pavilion.net [194.242.128.25]) by hub.freebsd.org (Postfix) with ESMTP id D9ED614D73; Fri, 24 Sep 1999 05:17:51 -0700 (PDT) (envelope-from joe@florence.pavilion.net) Received: (from joe@localhost) by florence.pavilion.net (8.9.3/8.8.8) id NAA45516; Fri, 24 Sep 1999 13:17:48 +0100 (BST) (envelope-from joe) Date: Fri, 24 Sep 1999 13:17:47 +0100 From: Josef Karthauser To: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Patch to CVSROOT/commit_prep.pl Message-ID: <19990924131747.S33739@florence.pavilion.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre2i X-NCC-RegID: uk.pavilion Organisation: Pavilion Internet plc, 24 The Old Steine, Brighton, BN1 1EL, England Phone: +44-845-333-5000 Fax: +44-845-333-5001 Mobile: +44-403-596893 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk I'm hacking the CVSROOT files to make use of them locally, and thought that perhaps the following patch may be useful :) Joe. *** commit_prep.pl Tue Sep 21 14:33:52 1999 --- /home/joe/commit_prep.pl Fri Sep 24 13:15:22 1999 *************** *** 47,68 **** ############################################################ $LAST_FILE = "/tmp/#cvs.files.lastdir"; $ENTRIES = "CVS/Entries"; $NoId = " %s - Does not contain a line with the keyword \"\$FreeBSD:\".\n"; # Protect string from substitution by RCS. $NoName = " ! %s - The ID line should contain only \"\$\FreeBSD\$\" for a newly created file.\n"; #$DelPath = " ! #%s - The old path and version has been deleted from \$\FreeBSD\$.\n"; ! $BadId = "%s - The \$\FreeBSD\$ is mangled.\n"; $BadName = " %s - The pathname '%s' ! in the \$\FreeBSD\$ line does not match the actual filename.\n"; $BadVersion = " %s - GRRR!! You spammed your copy of the file --- 47,69 ---- ############################################################ $LAST_FILE = "/tmp/#cvs.files.lastdir"; $ENTRIES = "CVS/Entries"; + $HEADER = 'Header'; $NoId = " %s - Does not contain a line with the keyword \"\$FreeBSD:\".\n"; # Protect string from substitution by RCS. $NoName = " ! %s - The ID line should contain only \$$HEADER\$ for a newly created file.\n"; #$DelPath = " ! #%s - The old path and version has been deleted from \$$HEADER\$.\n"; ! $BadId = "%s - The \$$HEADER\$ is mangled.\n"; $BadName = " %s - The pathname '%s' ! in the \$$HEADER\$ line does not match the actual filename.\n"; $BadVersion = " %s - GRRR!! You spammed your copy of the file *************** *** 97,103 **** $pos = -1; last if eof(FILE); $line = ; ! $pos = index($line, "\$\FreeBSD"); last if ($pos >= 0); } --- 98,104 ---- $pos = -1; last if eof(FILE); $line = ; ! $pos = index($line, "\$$HEADER"); last if ($pos >= 0); } *************** *** 105,113 **** printf($NoId, $filename); return(1); } ! $bareid = (index($line, "\$\FreeBSD: \$") >= 0 || ! index($line, "\$\FreeBSD\$") >= 0); ! if (!$bareid && $line !~ /\$\FreeBSD: .* \$/) { printf($BadId, $filename); return(1); } --- 106,114 ---- printf($NoId, $filename); return(1); } ! $bareid = (index($line, "\$$HEADER: \$") >= 0 || ! index($line, "\$$HEADER\$") >= 0); ! if (!$bareid && $line !~ /\$$HEADER: .* \$/) { printf($BadId, $filename); return(1); } -- Josef Karthauser FreeBSD: How many times have you booted today? Technical Manager Viagra for your server (http://www.uk.freebsd.org) Pavilion Internet plc. [joe@pavilion.net, joe@uk.freebsd.org, joe@tao.org.uk] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message