Re: Error converting from 1.4.4.1 to 1.5.0?
- From
Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
- Date
- Feb 15, 2007, 08:40 UTC
- Message-ID
- <20070215084059.GA5428@informatik.uni-freiburg.de>
- In-Reply-To
- <17875.33204.413186.355557@lisa.zopyra.com>
Bill Lear wrote:
Show 12 quoted lines
> WAAAAAIAMINIT ... I think I see it: > > % perl -pi -e 's/.*\$Id.*//sx' $(xgrep -l '[$]Id') > > Could I have corrupted the pack file? I'll bet $50 I did: > > % [yet another clone] > % xgrep -l '[$]Id' > ./.git/objects/pack/pack-23d1a9af78b4b78d1f3750cf70f83cb91a20ba64.pack > [...] > > %!@#$&$%(@@@!!!
I suffered from something like that, too. Since then I have a script "ufind". It's a wrapper around find that ignores CVS, Subversion, Git and hg metadata. Then "my" command would be:
$ ufind -type f -print0 | xargs -0 -r grep -lZ '[$]Id' | xargs -r perl -p -i -e 's/.../'
Where ... is something more restrictive that your .*\$Id.*
For the interessted the script is attached.
--
Uwe Kleine-König
cat /*dev/null; echo 'Hello World!';
cat > /dev/null <<*/
() { } int main() { printf("Hello World!\n");}
/* */
#! /usr/bin/env python
# Copyright (C) Uwe Zeisberger
import itertools, os, sys
ignoreexpr = ['-type', 'd', '(', '-name', 'CVS', '-o', '-name', '.svn', '-o', '-name', '.git', '-o', '-name', '.hg', ')']
paths = list(itertools.takewhile(lambda x: x[0] not in '-(),!', sys.argv[1:]))
args = sys.argv[1 + len(paths):] or ['-true']
os.execvp('find', ['find'] + paths + ['('] + ignoreexpr + [')', '-prune', '-false', '-o', '-not', '('] + ignoreexpr + [')', '('] + args + [')'])