Stefan Sperling wrote on Mon, Feb 01, 2016 at 10:51:39 +0100:
> On Sun, Jan 31, 2016 at 11:48:26AM +0100, Andreas Scherer wrote:
> > I suggest to extend 'svn patch' so that it supports usage in a pipe like
> >
> > gzip -dc patch-0042.gz | svn patch -P patch-0042 -
> >
> > This would permit using 'svn patch' directly as a drop-in replacement for
> >
> > gzip -dc patch-0042.gz | patch
> >
> > An example use case is the '%autosetup -S [SCM]' feature of RPM
> > (http://www.rpm.org/wiki/PackagerDocs/Autosetup,introducedinversion4.11;
That link 404s; I think you meant http://www.rpm.org/wiki/PackagerDocs/Autosetup
> Also, I think we should preserve the following behaviour if stdin is
> indeed a terminal:
>
> $ svn patch
> svn: E205001: Try 'svn help patch' for more information
> svn: E205001: Not enough arguments provided
>
> This is consistent with other svn subcommands, and avoids giving the
> impression that 'svn patch' "hangs" when the user doesn't pass a patch
> on stdin. This avoids confusing casual command line users line who might
> not know about file redirection and pipes (I know we have such users,
> based on my personal interactions with many of them).
Let's not throw the baby out with the bathwater. Simply printing an
informative message "svn: Reading a patch from standard input; press ^D
to abort" should address the confusion without breaking the use-case of
people who run 'patch' without arguments and then paste a patch from the
clipboard.
Cheers,
Daniel
Received on 2016-02-07 01:22:08 CET