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

Re: svn diff --svnpatch & svn patch

From: Mark Phippard <markphip_at_gmail.com>
Date: 2007-09-08 17:05:00 CEST

On 9/8/07, Charles Acknin <charlesacknin@gmail.com> wrote:
> On 9/8/07, Mark Phippard <markphip@gmail.com> wrote:
> > I am still confused about the GNU patch part. Does svn patch apply
> > the patch if you do not have GNU patch or does it require it? Is GNU
> > patch just required for people that want to apply a patch from the
> > unidiff? Is there any difference in the outcome?
>
> GNU patch is not required. We didn't solve the problem of applying
> unidiff yet (not all the platforms Subversion supports have GNU patch;
> injecting GNU patch into Subversion would raise at least licensing
> questions) , so I did rather leave the unidiff part aside (and let the
> user deal with it with her/his own tools). Put differently, we have
> three use-cases depending on whether the input you're feeding 'svn
> patch' with is:
> 1. unidiff only : 'svn patch' does nothing.
> 2. unidiff+svnpatch: 'svn patch' parses the input until it finds
> svnpatch bytes, and processes these. The unidiff bytes are ignored.
> 3. svnpatch only: 'svn patch' processes svnpatch bytes.
>
> To sum up: Subversion handles the svnpatch bytes and the user is free
> to run e.g. GNU patch against the unidiff part of the patch.

OK, I do not think that was clear before. I did not think your option
#1 was ever a real goal for this feature. It would obviously be a
cool addition, but not a must-have at all.

A couple of questions:

1) Can patches be applied to working copies that do not have the exact
same revisions of the files that were used to produce the patches? I
recall this being discussed on the list in the past.

2) Are there any public API's in your code to interrogate the patch
contents? I am trying to think of how a visual patch apply tool like
TortoiseMerge could be extended to show what is in the patch and allow
the user to selectively apply portions of it.

-- 
Thanks
Mark Phippard
http://markphip.blogspot.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Sep 8 17:01:45 2007

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.