From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31323 invoked by alias); 13 Jul 2006 21:41:29 -0000 Received: (qmail 31306 invoked by uid 22791); 13 Jul 2006 21:41:28 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Thu, 13 Jul 2006 21:41:26 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1G18vz-0001Ih-Li; Thu, 13 Jul 2006 17:41:23 -0400 Date: Thu, 13 Jul 2006 21:41:00 -0000 From: Daniel Jacobowitz To: Joel Brobecker Cc: gdb@sources.redhat.com Subject: Re: [RFA] New substitute-path commands Message-ID: <20060713214123.GA4967@nevyn.them.org> Mail-Followup-To: Joel Brobecker , gdb@sources.redhat.com References: <20060707191203.GD971@adacore.com> <20060710054027.GF971@adacore.com> <20060710214706.GA2390@adacore.com> <20060710215114.GA31444@nevyn.them.org> <20060710215630.GB2390@adacore.com> <20060710215839.GA31772@nevyn.them.org> <20060713212746.GA1519@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060713212746.GA1519@adacore.com> User-Agent: Mutt/1.5.11+cvs20060403 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-07/txt/msg00073.txt.bz2 On Thu, Jul 13, 2006 at 02:27:46PM -0700, Joel Brobecker wrote: > My question is the following: When you enter a second rule, should it > take precedence over the first one you entered? More generally, should > the substitution rules entered last be used first, or the opposite? Good question. I'm strongly in favor of intelligent users picking rules where it doesn't make a difference! :-) > I'm 50-50 on this: > > . With first-entered/first-used, you enter the rules following the > logic "if blah, then replace with [...]; else if bloh, then replace > with [...]; else if [...], then [...]". In other words, you enter > the rules in the same order you would write a "program". It seems > pretty natural. > > . With last-entered/first-used, it's possible to override previous > entries without having to delete the previous rules. Not so natural > to "program", though. > > Actually, as I'm writing this, I now favor first-entered/first-used. > One can delete a rule if he wants to override it. It's marginal anyway. > > What do you guys think? I think that's fine. Let's not overdesign this. I was only half-kidding about calling a Python function to transform the source pathnames if you want to do anything more complicated - if someone comes up with a legitimate use for anything more complex than a simple list of prefixes, we can do something along those lines. -- Daniel Jacobowitz CodeSourcery