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

Re: SVN Patch Vs GNU Patch

From: Stefan Sperling <stsp_at_elego.de>
Date: Sat, 4 Jan 2020 10:35:21 +0100

On Fri, Jan 03, 2020 at 11:27:01PM +0000, Dipu Haridasan wrote:
> Hi Team,
>
> I observed that for `svn patch` to apply properly, the spaces between filename and revision in the patch must be a tab. However, the GNU patch works irrespective of the number of spaces between filename and revision. For example, the below patch can be applied using the GNU patch, however with `svn patch` it fails to apply the patch as there are more spaces between filename and revision argument (brcm_cos_utils.c (revision 1070911)).
>
> Index: brcm_cos_utils.c
> ===================================================================
> --- brcm_cos_utils.c (revision 1070911) <<< Extra spaces between filename and revision.
> +++ brcm_cos_utils.c (working copy)
> @@ -1216,8 +1216,8 @@
>
> Wondering if this can be considered as a feature request for svn, as GNU (Unix) patch handles it irrespective of the spaces between filenames and revision.
>
> Thanks,
> Dipu H
>

This was discussed just a few days ago on the dev@ list:
https://svn.haxx.se/dev/archive-2019-12/0108.shtml

'svn patch' works with the output of regular diff tools, 'svn diff', and the
diff output produced by other version control systems such as git and hg.
If a patch does not apply after transfer that means it was broken in transit.

Patch files can be mangled during transfer in any number of ways.
Adding workarounds for mangled patches is not a sustainable approach.
Received on 2020-01-04 10:35:58 CET

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.