views:

68

answers:

2

I would like to do something like this:

svn revert --recursive mydata/*/*.txt

and I want it to revert all files which have extension *.txt in the directory mydata. Is there a way to do that?

A: 

Are you using Linux or some other Unix variant which supports find? (Heck, it would probably be fine in cygwin too.) If so, try this:

svn revert `find mydata -name '*.txt'`

If you've got a lot of files you may need to use xargs instead.

Jon Skeet
+1  A: 

What about:

find mydata -mindepth 2 -name \*.txt | xargs svn revert
mrkj
I doing it from perl, so yeah - I can iterate through files myself, but I was wondering if there is a way to do that in a single svn command.
Paulius Liekis