From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20633 invoked by alias); 24 Jun 2008 18:28:00 -0000 Received: (qmail 20624 invoked by uid 22791); 24 Jun 2008 18:28:00 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 24 Jun 2008 18:27:32 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id D57AC98366; Tue, 24 Jun 2008 18:27:30 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 9CEE59805C; Tue, 24 Jun 2008 18:27:30 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1KBDEn-0003AP-O9; Tue, 24 Jun 2008 14:27:29 -0400 Date: Tue, 24 Jun 2008 18:28:00 -0000 From: Daniel Jacobowitz To: Andrew STUBBS Cc: Mark Kettenis , gdb@sourceware.org Subject: Re: GDB Focus Group at the 2008 GCC Summit Message-ID: <20080624182729.GA11806@caradoc.them.org> Mail-Followup-To: Andrew STUBBS , Mark Kettenis , gdb@sourceware.org References: <20080619190942.GA3744@adacore.com> <200806232208.m5NM8HTZ011692@brahms.sibelius.xs4all.nl> <4860B1E2.3000309@st.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="bp/iNruPH9dso1Pn" Content-Disposition: inline In-Reply-To: <4860B1E2.3000309@st.com> User-Agent: Mutt/1.5.17 (2008-05-11) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-06/txt/msg00244.txt.bz2 --bp/iNruPH9dso1Pn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 466 On Tue, Jun 24, 2008 at 09:35:46AM +0100, Andrew STUBBS wrote: > Mark Kettenis wrote: >> Objection! I have played with SVN for work and I really dilike the >> fact that a checked out repository is very grep unfriendly. > > grep --exclude=*.svn-base > > I have it in an alias. A slightly more thorough version attached, for anyone who wants it. Another alternative is to use svk; one of the advantages is smaller working trees. -- Daniel Jacobowitz CodeSourcery --bp/iNruPH9dso1Pn Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=svngrep Content-length: 1694 #!/bin/bash # svngrep - recursive grep safe for SVN trees (and quilt) # Copyright (C) 2008 Daniel Jacobowitz # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . args=() files=() next_opt=false next_file=false need_pattern=true for arg; do if $next_file; then if $need_pattern; then args=("${args[@]}" "$arg") need_pattern=false else files=("${files[@]}" "$arg") fi elif $next_opt; then next_opt=false args=("${args[@]}" "$arg") else case "$arg" in -e|-f) need_pattern=false next_opt=true args=("${args[@]}" "$arg") ;; -m|-A|-B|-C|-D|-d) next_opt=true args=("${args[@]}" "$arg") ;; -r) # Just consume -r. ;; --) args=("${args[@]}" "$arg") next_file=true ;; -*) args=("${args[@]}" "$arg") ;; *) if $need_pattern; then args=("${args[@]}" "$arg") need_pattern=false else files=("${files[@]}" "$arg") fi next_file=true ;; esac fi done find "${files[@]}" -name .svn -prune \ -o -name .pc -prune -o -name \*~ -prune \ -o -type f -print0 | xargs -0 grep "${args[@]}" --bp/iNruPH9dso1Pn--