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

Re: Inverse of svn export (only create or update .svn / _svn directories)

From: Blair Zajac <blair_at_orcaware.com>
Date: 2007-03-05 22:21:25 CET

Matthew Hannigan wrote:
> On Mon, Mar 05, 2007 at 09:51:32AM -0800, Blair Zajac wrote:
>> Matthew Hannigan wrote:
>>> On Sat, Mar 03, 2007 at 04:23:38PM +1100, Matthew Hannigan wrote:
>>>> Here you go .. (attached)
>>>> It doesn't do _svn directories, but then
>>>> it's only for Unix anyway .. or cygwin I guess.
>>>> Bug fixes gratefully accepted.
>>> Heh, I can see an improvement to be made already;
>>> use the 0 eol features of gnu's find and cpio:
>>> i.e.
>>> do
>>> find . -print0 | grep '/\.svn' | cpio -pdm0 "$checkout"
>>> instead of
>>> find . -print | grep '/\.svn' | cpio -pdm "$checkout"
>> You can't do a grep when you use -print0, since the output from print0
>> is at minimum a single line, s grep will not remove what you don't need.
> Good point, it looks like there was a good reason to use the non-0 form!
>> You need something like this
>> find . -name .svn -print0 | cpio -pdm0 "$checkout"
> That won't do it; cpio will only copy the .svn dir
> and not their contents.

Good point. Forgot that cpio is not recursive.

You can do

find -path '*/.svn/*' -print0


Blair Zajac, Ph.D.
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Mar 5 22:22:26 2007

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.