Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ignoring externals when copying

Tags:

svn

I want to ignore externals when I copy from source to destination. I tried

svn cp --ignore-externals sourcepath destpath

but the externals still exist. Any idea how I can make this work?

My source structure is as follows:

trunk
   dir1 with sub dir ( need all of this)
   dir2 with sub dir ( each sub dir has a file with svn external prop set)
   dir3 with sub dir ( need all of this)

I should be able to get all that I want except externals in my branch with one cp command.

Thanks.

like image 298
user1164061 Avatar asked Oct 21 '22 12:10

user1164061


1 Answers

You can't.

The svn:externals is a property on the file or directory itself. It's as much a part of the file as any actual text in the file. Wanting to copy a directory without the property is like wanting to copy a file without all of the text in that file. It just can't be done.

Also, the --ignore-externals flag doesn't remove the svn:externals property, it merely prevents Subversion from acting upon that property when you do an svn co or an svn update.

If it's any consolation, you can recursively delete properties by using the -R flag:

$ svn propdel -R svn:externals destdir

By the way, are you doing this on your working copy directory, or on the URL?

like image 73
David W. Avatar answered Nov 10 '22 00:11

David W.