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

Re: using -F fails using bash process substitution. bug?

From: Philip Martin <philip_at_codematters.co.uk>
Date: Thu, 19 Jul 2018 16:16:15 +0100

Zing Shishak <zing_at_fastmail.fm> writes:

> The following fails to set svn:ignore using process substitution for the
> file option:
>
> $ svn ps svn:ignore -F <(echo -ne "ignorethis\n") .
> property 'svn:ignore' set on '.'
>
> The property is created but it's empty. Is this something that's not
> expected to work? I seem to remember doing this in the past and having
> it work.

The workaround is to use:

  echo -ne "ignorethis\n" | svn ps svn:ignore -F - .

It's possible it did work in the past and in other places that construct
does work, e.g.

   svnmucc -mm put <(echo foo) URL

Subversion has multiple ways to read a file and when reading from a pipe
(and that shell command constructs a pipe) the code that uses stat() to
get the filesize doesn't work because the pipe filesize is zero. There
is other code that doesn't use stat() and reads in block until EOF, and
that works for pipes. We might be able to fix the code that uses stat()
by having it check for EOF as well.

-- 
Philip
Received on 2018-07-19 17:16:32 CEST

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.