Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Andrew STUBBS <andrew.stubbs@st.com>
Cc: Mark Kettenis <mark.kettenis@xs4all.nl>, gdb@sourceware.org
Subject: Re: GDB Focus Group at the 2008 GCC Summit
Date: Tue, 24 Jun 2008 18:28:00 -0000	[thread overview]
Message-ID: <20080624182729.GA11806@caradoc.them.org> (raw)
In-Reply-To: <4860B1E2.3000309@st.com>

[-- Attachment #1: Type: text/plain, Size: 466 bytes --]

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

[-- Attachment #2: svngrep --]
[-- Type: text/plain, Size: 1694 bytes --]

#!/bin/bash

# svngrep - recursive grep safe for SVN trees (and quilt)
# Copyright (C) 2008 Daniel Jacobowitz <dan@codesourcery.com>

# 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 <http://www.gnu.org/licenses/>.

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[@]}"

  parent reply	other threads:[~2008-06-24 18:28 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-19 19:10 Joel Brobecker
2008-06-22  6:08 ` Thiago Jung Bauermann
2008-06-22 11:52 ` Nick Roberts
2008-06-22 13:53   ` Joel Brobecker
2008-06-23 15:17   ` Tom Tromey
2008-06-23 17:35     ` Jim Ingham
2008-06-23 21:55     ` Nick Roberts
2008-06-23 15:16 ` Tom Tromey
2008-06-26  0:24   ` Tom Tromey
2008-07-03  3:27   ` Thiago Jung Bauermann
2008-07-03  8:12     ` Andreas Schwab
2008-07-03 12:35     ` Daniel Jacobowitz
2008-07-03 14:28       ` Thiago Jung Bauermann
2008-07-04  2:33       ` Tom Tromey
2008-07-04  3:19         ` Daniel Jacobowitz
2008-06-23 21:46 ` Jason Molenda
2008-06-23 22:22   ` Nick Roberts
2008-06-24 21:18     ` Nick Roberts
2008-06-25  6:56       ` [MI] changing breakpoint location (Was: GDB Focus Group at the 2008 GCC Summit) Vladimir Prus
2008-06-23 22:09 ` GDB Focus Group at the 2008 GCC Summit Mark Kettenis
2008-06-23 22:26   ` Joel Brobecker
2008-06-24  8:35   ` Andrew STUBBS
2008-06-24  8:56     ` Andreas Schwab
2008-06-24 18:12     ` Michael Snyder
2008-06-24 18:28     ` Daniel Jacobowitz [this message]
2008-06-24 19:33     ` Dave Korn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080624182729.GA11806@caradoc.them.org \
    --to=drow@false.org \
    --cc=andrew.stubbs@st.com \
    --cc=gdb@sourceware.org \
    --cc=mark.kettenis@xs4all.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox