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

Re: [RFE] Make 'svn patch' read from STDIN

From: Andreas Scherer <andreas_coder_at_freenet.de>
Date: Mon, 01 Feb 2016 12:44:38 +0100

Am Montag, 1. Februar 2016, 10:51:39 schrieb Stefan Sperling:
> So we could consider extending svn patch to run without a path argument
> and read the patch from stdin.
>
> [...] this feature falls squarly into the domain of the command line client
> and not the API.
>
> Also, I think we should preserve the following behaviour
> $ svn patch
> svn: E205001: Try 'svn help patch' for more information
> svn: E205001: Not enough arguments provided
> Invoking 'svn patch' with a path to a patch file must remain a valid
> use case. We cannot break backwards compatibilty here.

> > gzip -dc patch-0042.gz | svn patch -P patch-0042 -
That's why my suggested invocation had a hyphen '-' at the end, playing the
role of a place-holder for 'stdin'. This preserves both current situations,
i.e., 'svn patch' being called without an argument (--> error) and with a
filename (--> normal processing). Also, 'svn patch -' should _require_ to be
supplied with the '-P' option and a filename for storage.

Thanks for considering this.

Received on 2016-02-01 12:48:10 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.