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

Re: Copy directory but only those files under revision control

From: Martin Scharrer <mailinglists_at_madmarty.de>
Date: 2006-12-20 12:01:59 CET

On Tuesday 19 December 2006 03:09, si wrote:
> Hi David,
>
> > I'd like to copy a directory called chapter1 to a directory called
> > functions in my working copy, but only the files under revision
> > control, not every file in chapter1.
> >
> > How do I do this?
>
> svn export will handle this for you:
>
> http://svnbook.red-bean.com/en/1.2/svn.ref.svn.c.export.html
This will copy only versioned files but the copied dir won't be a working dir
any more. You could copy all .svn files using rsync so you have a working
dir again:

svn export chapter1 functions/chapter1/
rsync --filter='+_**/.svn' --filter='+_**/.svn/**' --filter='+_**/' --filter='-_**/*'
chapter1/ functions/chapter1/ -av

Note that rsync is quite sensitive to trailing slashes (/).

best,
Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Dec 20 12:05:59 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.