From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15117 invoked by alias); 27 Nov 2009 14:40:16 -0000 Received: (qmail 15109 invoked by uid 22791); 27 Nov 2009 14:40:15 -0000 X-SWARE-Spam-Status: No, hits=-3.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: sourceware.org Received: from c60.cesmail.net (HELO c60.cesmail.net) (216.154.195.49) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 27 Nov 2009 14:40:11 +0000 Received: from unknown (HELO delta2) ([192.168.1.50]) by c60.cesmail.net with ESMTP; 27 Nov 2009 09:40:09 -0500 Received: from 89.240.199.199 ([89.240.199.199]) by webmail.spamcop.net (Horde MIME library) with HTTP; Fri, 27 Nov 2009 09:40:09 -0500 Message-ID: <20091127094009.f71b9x4jk448gsgk-nzlynne@webmail.spamcop.net> Date: Fri, 27 Nov 2009 14:40:00 -0000 From: Joern Rennecke To: Richard Earnshaw Cc: Richard Guenther , tromey@redhat.com, Basile STARYNKEVITCH , gcc@gcc.gnu.org Subject: SVN pre-commit filter (Was: Re: WTF?) References: <4B0D6245.3010601@redhat.com> <10911251719.AA00825@vlsi1.ultra.nyu.edu> <10911251903.AA01903@vlsi1.ultra.nyu.edu> <4B0D8BAA.8020505@starynkevitch.net> <84fc9c000911251508h5c198f8fh27548ec2ef30e2a9@mail.gmail.com> <1259317474.9961.14.camel@e200601-lin.cambridge.arm.com> In-Reply-To: <1259317474.9961.14.camel@e200601-lin.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) H3 (4.1.4) Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2009-11/txt/msg00779.txt.bz2 Quoting Richard Earnshaw : > An SVN pre-commit filter (default on, disabled by SVN attribute if > needed) should instead just reject files that have trailing white space. I think a better mechanism to deal with exceptions is to have a property that describes the current misformatting (or unusual formatting for some test cases / Makefiles). I.e. if a file is known to have N lines with trailing whitespace, M with spaces-for-tabs, K with spaces-hidden-in-front-of-tabs, and L with carriage return, a patch will be rejected if it increases N, M, K or L. If it decreases it, the count property can be auto-adjusted to prevent regressions. And if you really have to, you can adjust a property by hand before checking in a patch that increases one of the counts.