subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Philip Martin <phi...@codematters.co.uk>
Subject Re: using -F fails using bash process substitution. bug?
Date Thu, 19 Jul 2018 15:16:15 GMT
Zing Shishak <zing@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

Mime
View raw message