[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: New vendor drops on vendor branch - but how?

From: Gavin Lambert <gavinl_at_compacsort.com>
Date: 2006-08-21 00:42:36 CEST

Quoth Bob Proulx <mailto:bob@proulx.com>:
> Gavin Lambert wrote:
>> I haven't tried this myself (so try it without the 'rm' first to make
>> sure it gives the right results!), but this ought to remove all files
>> except for the .svn folders, starting from the current directory:
>>
>> find . | grep -v .svn | xargs rm -f
>
> That find command with "grep" looks very suspicious to me.
> Perhaps you wanted to suggest something like this instead?
>
> find . -type d -name .svn -prune -o -type f -print0 | xargs -r0 ls
> -ldog
>
> And after inspecting for safety then replace the "ls -ldog"
> with "rm -f"?

Yes, someone else suggested the same thing the next day.

I didn't like the find with grep either, but (since I had forgotten the
'-o -type f -print' bit) using just -prune resulted in printing all the
.svn folders, not all *but* the .svn folders. I was in a hurry, so I
didn't have time to experiment much further :)

The man page I've got on find wasn't particularly forthcoming either,
and didn't explain how -prune interacts with the other options.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Aug 21 00:43:58 2006

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.