Wednesday, November 19, 2008

svn and tons of ignores

I never realized what a pain it was to maintain svn:ignore properties until I started using git (which makes it really easy to collect cruft metadata after a build).

After some searching on the web, I found this script:

# svn-ignore - tell Subversion to ignore a file in certain operations.

# See: []

test -z "$1" && echo "Usage: $0 FILENAME" && exit -1

for fullname in "$@"


dirname=$(dirname "$fullname")

filename=$(basename "$fullname")

(svn propget svn:ignore "$dirname" | egrep -v '^$';

echo "$filename") >/tmp/svn-ignore.$$

svn propset svn:ignore -F /tmp/svn-ignore.$$ "$dirname"

rm /tmp/svn-ignore.$$


That coupled with:

for i in `svn status` ; do if [ $i != "?" ]; then echo $i ; svn-ignore $i ; fi ; done

really saved me a lot of work.


Anonymous said...

I'm looking for a Wade Berrier. And I was wondering if you have been to Norway in 1999, Mosj√łen and Evje?

Wade Berrier said...

Yup, that's me!

Anonymous said...

Then I believe I was your Norwegian companion for a while... Do you still use your very old email address at ?

Wade Berrier said...


Sorry, my address went out of commission shortly after I returned to the States :(

My new address is now showing on my blogspot profile page: