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

Copy directory non-recursively

From: Matt Madrid <admiralcap_at_gmail.com>
Date: 2007-07-13 02:07:07 CEST

Is there any way to copy a directory.. but not it's contents .. from
one place to another.

Take this structure:

trunk/
  stuff/
     file1
     file2
     file3

The following command...

  svn cp trunk/stuff branches/branch1/

...will of course result in the stuff directory and all of it's
contents to be copied recursively. But what if I want only certain
files in stuff to be copied, so that I end up with a branch like this:

branches/
   branch1/
          stuff/
              file1

How do I do that? I've tried this:

 svn cp trunk/stuff/file1 branches/branch1/

But that only copies the file to the top level of the branch, with no
directory creation.

Or this:

  svn cp trunk/stuff/file1 branches/branch1/stuff/

Which creates a file called stuff in the branch that is a copy of file1.

I suppose I could create the directory stuff manually with "svn
mkdir", but then I wouldn't have any history information kept. Also,
if the directories happened to be nested a few levels deep, I would
need to create each level manually(mkdir -p would be nice), again
losing all history information.

Any ideas? Am I missing something. Thanks..

Matt M.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Jul 13 02:06:45 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.