You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Bellamy Baron <be...@gmail.com> on 2018/07/03 14:32:04 UTC

Subversion server

 Does anyone know of a way to export a directory directly from a subversion
server and exclude certain filetypes?

Thanks in advance for your assistance.

-- 
--------------------------------------------------------------------------------------------------------
Bellamy
Specialist  - iWYZE
https://www.iwyze.co.za/products/car-insurance

Re: Subversion server

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Daniel Shahaf wrote on Thu, 05 Jul 2018 15:22 +0000:
> Johan Corveleyn wrote on Thu, 05 Jul 2018 11:53 +0200:
> > I do think it would be a great feature though, to have --include and
> > --exclude options (with glob-like syntax, like our recent --search
> > option for 'svn ls') for certain svn commands. With server-side
> > support to only send the matching items (and falling back to pure
> > client-side filtering when talking to older servers). Then one could
> > do these as an efficient operation (if there is server-side support):
> > 
> 
> Even without any new server-side support, if the client can be assumed
> to have `svn ls -R` output, then it can simply drive the reporter in the
> right way for the server to return exactly the right data.
> 

The "reporter" is the server-side interface that answers 'svn update' requests.

> > * svn cat -R --include '*.txt' $URL
> > * svn export --include 'build.xml' $URL (<- creating sparse directory
> > structure with only the matching files)
> > * svn export --exclude '*.iso' $URL
> 
> This reminds me of the new authz-with-globs feature...

Re: Subversion server

Posted by Johan Corveleyn <jc...@gmail.com>.
On Thu, Jul 5, 2018 at 5:22 PM, Daniel Shahaf <d....@daniel.shahaf.name> wrote:
> Johan Corveleyn wrote on Thu, 05 Jul 2018 11:53 +0200:
>> I do think it would be a great feature though, to have --include and
>> --exclude options (with glob-like syntax, like our recent --search
>> option for 'svn ls') for certain svn commands. With server-side
>> support to only send the matching items (and falling back to pure
>> client-side filtering when talking to older servers). Then one could
>> do these as an efficient operation (if there is server-side support):
>>
>
> Even without any new server-side support, if the client can be assumed
> to have `svn ls -R` output, then it can simply drive the reporter in the
> right way for the server to return exactly the right data.

Ah yes, indeed. That'll surely be more efficient than downloading all
files and filtering client-side.

On top of that, the client can use the new-in-1.10 'svn ls -R --search
$glob-pattern' to gather the already-filtered list of files (a 1.10
server will perform the filtering of the list of files on the
server-side then). This is beginning to sound like low-hanging fruit
:-). For the include case at least ... for the exclude case there is
no server-optimized ls operation (yet).

-- 
Johan

Re: Subversion server

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Johan Corveleyn wrote on Thu, 05 Jul 2018 11:53 +0200:
> I do think it would be a great feature though, to have --include and
> --exclude options (with glob-like syntax, like our recent --search
> option for 'svn ls') for certain svn commands. With server-side
> support to only send the matching items (and falling back to pure
> client-side filtering when talking to older servers). Then one could
> do these as an efficient operation (if there is server-side support):
> 

Even without any new server-side support, if the client can be assumed
to have `svn ls -R` output, then it can simply drive the reporter in the
right way for the server to return exactly the right data.

> * svn cat -R --include '*.txt' $URL
> * svn export --include 'build.xml' $URL (<- creating sparse directory
> structure with only the matching files)
> * svn export --exclude '*.iso' $URL

This reminds me of the new authz-with-globs feature...

Re: Subversion server

Posted by Johan Corveleyn <jc...@gmail.com>.
On Tue, Jul 3, 2018 at 4:32 PM, Bellamy Baron <be...@gmail.com> wrote:
> Does anyone know of a way to export a directory directly from a subversion
> server and exclude certain filetypes?

Not as far as I know. If you are using TortoiseSVN, maybe something
can be done with client-side hook scripts [1], for example delete
unwanted files after exporting. Though I don't think there are
client-side hooks for the "export" operation.

I do think it would be a great feature though, to have --include and
--exclude options (with glob-like syntax, like our recent --search
option for 'svn ls') for certain svn commands. With server-side
support to only send the matching items (and falling back to pure
client-side filtering when talking to older servers). Then one could
do these as an efficient operation (if there is server-side support):

* svn cat -R --include '*.txt' $URL
* svn export --include 'build.xml' $URL (<- creating sparse directory
structure with only the matching files)
* svn export --exclude '*.iso' $URL

[1] https://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-settings.html#tsvn-dug-settings-hooks

-- 
Johan