You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "Niemann, Hartmut" <ha...@siemens.com> on 2013/03/26 08:46:38 UTC

svn export selected parts of svn:externals

Hello!

I have a directory <stuff> with some files and a list of svn:external directories <stuff/one/>, <stuff/two/> and so on.
I want to svn export <stuff> with the files in it and only one of the svn:externals, not the others.

I do not want to refer to the repository where the externals are located in, because the script that does the
Svn export should not (need to) know where they are.

I tried to svn export --depth files stuff && svn export --depth infinity stuff/one, but this fails because this directory is not existent in the repository.

Is it possible to svn export only one of several svn:external directories?
Or should I export all and delete all the files I don't need?

(I work with tortoise SVN 1.7's command line client on windows 7)

With best regards
Hartmut Niemann


Re: svn export selected parts of svn:externals

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Ryan Schmidt wrote on Tue, Mar 26, 2013 at 05:40:22 -0500:
> 
> On Mar 26, 2013, at 02:46, "Niemann, Hartmut" wrote:
> 
> > I have a directory <stuff> with some files and a list of svn:external directories <stuff/one/>, <stuff/two/> and so on.
> > I want to svn export <stuff> with the files in it and only one of the svn:externals, not the others.
> > 
> > I do not want to refer to the repository where the externals are located in, because the script that does the
> > Svn export should not (need to) know where they are.
> > 
> > I tried to svn export --depth files stuff && svn export --depth infinity stuff/one, but this fails because this directory is not existent in the repository.
> > 
> > Is it possible to svn export only one of several svn:external directories?
> > Or should I export all and delete all the files I don't need?
> > 
> 
> I don't think what you want is easily possible. You'll have to script it.
> 
> You could export with all the externals and delete the ones you don't need, as you suggest.
> 
> Or you could export with no externals at all, then manually export the
> ones you want. You say you don't want the script to need to know where
> the externals are located, but it doesn't need to: it can look it up
> from the svn:externals property using "svn propget".

Alternatively, on 1.7+, you can look for .svn directories instead of
parsing the svn:externals property.  Only the wc root and roots of
externals will have .svn dirs.

Re: svn export selected parts of svn:externals

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Mar 26, 2013, at 02:46, "Niemann, Hartmut" wrote:

> I have a directory <stuff> with some files and a list of svn:external directories <stuff/one/>, <stuff/two/> and so on.
> I want to svn export <stuff> with the files in it and only one of the svn:externals, not the others.
> 
> I do not want to refer to the repository where the externals are located in, because the script that does the
> Svn export should not (need to) know where they are.
> 
> I tried to svn export --depth files stuff && svn export --depth infinity stuff/one, but this fails because this directory is not existent in the repository.
> 
> Is it possible to svn export only one of several svn:external directories?
> Or should I export all and delete all the files I don't need?
> 

I don't think what you want is easily possible. You'll have to script it.

You could export with all the externals and delete the ones you don't need, as you suggest.

Or you could export with no externals at all, then manually export the ones you want. You say you don't want the script to need to know where the externals are located, but it doesn't need to: it can look it up from the svn:externals property using "svn propget".