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

Re: [PATCH] issue 1493 - use libsvn_diff for diffing props

From: Stefan Sperling <stsp_at_elego.de>
Date: Tue, 28 Jul 2009 17:00:56 +0100

On Mon, Jul 27, 2009 at 06:21:03PM -0700, David Glasser wrote:
> On Fri, Jul 24, 2009 at 11:07 AM, Daniel Näslund<daniel_at_longitudo.com> wrote:
> > Hey!
> >
> > This is my first attempt as a Subversion coder. Please be nice to me!
> >
> > It works for patch(1) but I haven't tried it on any other patch programs.
> >
> > Some background on the subject:
> > http://subversion.tigris.org/ds/viewMessage.do?dsMessageId=977146&dsForumId=462
> >
> > / Daniel Näslund
> > [[[
> > Fix part of issue 1493: Property diffs/merge should use libsvn_diff.
> > For properties I have removed the diff headers and replaced the @@-characters
> > with ##.
>
> Out of curiosity... why? Aren't people used to seeing "@@" for diff
> headers? Shouldn't the "file-level" headers make it clear that it's a
> prop diff?

We don't want patch(1) to see a diff it will try to apply.
We want it to ignore the property diff, because it's just for human
consumption. There is no file on the file system which the property
diff would apply to. patch(1) will however still try to be helpful
and ask what to do even if it can't find a diff header. But that just
gets in the way when people want to apply the diff for file contents
to their working copy.

 $ cat /tmp/test.diff
 @@ -1 +1 @@
 -alpha
 +a
 $ patch -p0 < /tmp/test.diff
 missing header for unified diff at line 1 of patch
 can't find file to patch at input line 1
 Perhaps you used the wrong -p or --strip option?
 File to patch:

To avoid this prompt we're changing the hunk header symbols.

Stefan
Received on 2009-07-28 19:05:59 CEST

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.